Up to date
This page is up to date for Godot
If you still find outdated information, please open an issue.
Inherits: Script < Resource < RefCounted < Object
A script implemented in the GDScript programming language.
A script implemented in the GDScript programming language. The script extends the functionality of all objects that instantiate it.
new creates a new instance of the script. Object.set_script extends an existing object, if that object's class matches one of the script's base classes.
new ( ... ) vararg
Variant new ( ... ) vararg
Returns a new instance of the script.
var MyClass = load("myclass.gd") var instance = MyClass.new() assert(instance.get_script() == MyClass)