Attention: Here be dragons
This is the
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
A script implemented in the GDScript programming language.
A script implemented in the GDScript programming language, saved with the
.gd extension. The script extends the functionality of all objects that instantiate it.
If you are looking for GDScript's built-in functions, see @GDScript instead.
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)