2023-09-06 01:45:29 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2024-04-26 17:32:25 +02:00
<class name= "ScriptServer" inherits= "Object" version= "4.4" >
2023-09-06 01:45:29 +02:00
<brief_description >
Global script class management singleton.
</brief_description>
<description >
ScriptServer manages all information related to global script classes in Godot projects, similar to [ClassDB] for engine classes. Scripts independently opt-in to become global classes. With it, you can check if a script has a global name or icon, what its base classes are, or even instantiate them directly.
[b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton through a global variable.
</description>
<tutorials >
2023-09-10 08:30:35 +02:00
<link > https://github.com/Relintai/pandemonium_engine_docs/blob/master/tutorials/scripting/gdscript/gdscript_basics.md</link>
2023-09-06 01:45:29 +02:00
</tutorials>
<methods >
<method name= "get_global_class_base" qualifiers= "const" >
2023-09-10 08:42:24 +02:00
<return type= "StringName" />
2023-09-06 01:45:29 +02:00
<argument index= "0" name= "class" type= "String" />
<description >
Returns the class name that the script named [code]class[/code] directly extends. This may be an engine class or another global script class.
</description>
</method>
<method name= "get_global_class_list" qualifiers= "const" >
<return type= "Array" />
<description >
Returns the names of all global script class names known by the ScriptServer.
</description>
</method>
<method name= "get_global_class_name" qualifiers= "const" >
2023-09-10 08:42:24 +02:00
<return type= "StringName" />
2023-09-06 01:45:29 +02:00
<argument index= "0" name= "path" type= "String" />
<description >
Returns the global class name bound to the [Script] at [code]path[/code].
</description>
</method>
<method name= "get_global_class_native_base" qualifiers= "const" >
2023-09-10 08:42:24 +02:00
<return type= "StringName" />
2023-09-06 01:45:29 +02:00
<argument index= "0" name= "class" type= "String" />
<description >
Returns the native engine class that the script named [code]class[/code] eventually extends.
</description>
</method>
<method name= "get_global_class_path" qualifiers= "const" >
<return type= "String" />
<argument index= "0" name= "class" type= "String" />
<description >
Returns the file path to the script resource named [code]class[/code].
</description>
</method>
<method name= "get_global_class_script" qualifiers= "const" >
<return type= "Script" />
2023-09-10 08:30:35 +02:00
<argument index= "0" name= "class" type= "StringName" />
2023-09-06 01:45:29 +02:00
<description >
Returns the loaded [Script] named [code]class[/code].
</description>
</method>
<method name= "instantiate_global_class" qualifiers= "const" >
<return type= "Variant" />
2023-09-10 08:30:35 +02:00
<argument index= "0" name= "class" type= "StringName" />
2023-09-06 01:45:29 +02:00
<description >
Returns a new instance of the scripted type defined by the script named [code]class[/code].
</description>
</method>
<method name= "is_global_class" qualifiers= "const" >
<return type= "bool" />
2023-09-10 08:30:35 +02:00
<argument index= "0" name= "class" type= "StringName" />
2023-09-06 01:45:29 +02:00
<description >
Returns [code]true[/code] if the name [code]class[/code] is a global script class.
</description>
</method>
</methods>
<constants >
</constants>
2023-09-10 08:42:24 +02:00
</class>