class_script - vkbsb/godot GitHub Wiki
Script
####Inherits: Resource ####Category: Core
Brief Description
Base class for scripts.
Member Functions
- bool can_instance ( ) const
- bool instance_has ( Object base_object ) const
- bool has_source_code ( ) const
- String get_source_code ( ) const
- void set_source_code ( String source )
- int reload ( )
Description
Base class for scripts. Any script that is loaded becomes one of these resources, which can then create instances.
Member Function Description
can_instance
- bool can_instance ( ) const
Return true if this script can be instance (ie not a library).
instance_has
Return true if a given object uses an instance of this script.
has_source_code
- bool has_source_code ( ) const
Return true if the script contains source code.
get_source_code
- String get_source_code ( ) const
Return the script source code (if available).
set_source_code
- void set_source_code ( String source )
Set the script source code.
reload
- int reload ( )
Reload the script. This will fail if there are existing instances.