Script
Inherited By: , GDScript, , PluginScript,
Category: Core
A class stored as a resource.
Properties
Description
A class stored as a resource. A script exends the functionality of all objects that instance it.
Property Descriptions
- source_code
The script source code or an empty string if source code is not available. When set, does not reload the class implementation automatically.
- bool can_instance ( ) const
Returns true
if the script can be instanced.
- get_base_script ( ) const
Returns the script directly inherited by this script.
Returns the script’s base type.
- bool has_script_signal ( signal_name ) const
- bool has_source_code ( ) const
Returns true
if the script contains non-empty source code.
- instance_has ( Object base_object ) const
Returns if base_object
is an instance of this script.
- is_tool ( ) const
Returns if the script is a tool script. A tool script can run in the editor.
- Error reload ( keep_state=false )
Reloads the script’s class implementation. Returns an error code.