Inherits: Script<class_script>
< Resource<class_resource>
< Reference<class_reference>
< Object<class_object>
Category: Core
A script implemented in the GDScript programming language.
PoolByteArray<class_poolbytearray> |
get_as_byte_code<class_GDScript_get_as_byte_code> ( ) const |
Object<class_object> |
new<class_GDScript_new> ( ) vararg |
A script implemented in the GDScript programming language. The script exends the functionality of all objects that instance it.
new<class_GDScript_new>
creates a new instance of the script. Object.set_script<class_Object_set_script>
extends an existing object, if that object's class matches one of the script's base classes.
PoolByteArray<class_poolbytearray>
get_as_byte_code ( ) const
Returns byte code for the script source code.
Object<class_object>
new ( ) vararg
Returns a new instance of the script.
For example:
var MyClass = load("myclass.gd")
var instance = MyClass.new()
assert(instance.get_script() == MyClass)