2021-06-19 15:58:49 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 08:08:05 +00:00
<class name= "GDExtensionManager" inherits= "Object" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2021-06-19 15:58:49 +00:00
<brief_description >
2024-01-08 14:44:06 +00:00
Provides access to GDExtension functionality.
2021-06-19 15:58:49 +00:00
</brief_description>
<description >
2024-01-08 14:44:06 +00:00
The GDExtensionManager loads, initializes, and keeps track of all available [GDExtension] libraries in the project.
[b]Note:[/b] Do not worry about GDExtension unless you know what you are doing.
2021-06-19 15:58:49 +00:00
</description>
<tutorials >
2024-01-08 14:44:06 +00:00
<link title= "GDExtension overview" > $DOCS_URL/tutorials/scripting/gdextension/what_is_gdextension.html</link>
<link title= "GDExtension example in C++" > $DOCS_URL/tutorials/scripting/gdextension/gdextension_cpp_example.html</link>
2021-06-19 15:58:49 +00:00
</tutorials>
<methods >
<method name= "get_extension" >
2022-12-07 11:11:28 +00:00
<return type= "GDExtension" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "path" type= "String" />
2021-06-19 15:58:49 +00:00
<description >
2024-01-08 14:44:06 +00:00
Returns the [GDExtension] at the given file [param path], or [code]null[/code] if it has not been loaded or does not exist.
2021-06-19 15:58:49 +00:00
</description>
</method>
<method name= "get_loaded_extensions" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "PackedStringArray" />
2021-06-19 15:58:49 +00:00
<description >
2024-01-08 14:44:06 +00:00
Returns the file paths of all currently loaded extensions.
2021-06-19 15:58:49 +00:00
</description>
</method>
2021-08-20 18:32:56 +00:00
<method name= "is_extension_loaded" qualifiers= "const" >
<return type= "bool" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "path" type= "String" />
2021-08-20 18:32:56 +00:00
<description >
2024-01-08 14:44:06 +00:00
Returns [code]true[/code] if the extension at the given file [param path] has already been loaded successfully. See also [method get_loaded_extensions].
2021-08-20 18:32:56 +00:00
</description>
</method>
2021-06-19 15:58:49 +00:00
<method name= "load_extension" >
2022-12-07 11:11:28 +00:00
<return type= "int" enum= "GDExtensionManager.LoadStatus" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "path" type= "String" />
2021-06-19 15:58:49 +00:00
<description >
2024-01-08 14:44:06 +00:00
Loads an extension by absolute file path. The [param path] needs to point to a valid [GDExtension]. Returns [constant LOAD_STATUS_OK] if successful.
2021-06-19 15:58:49 +00:00
</description>
</method>
<method name= "reload_extension" >
2022-12-07 11:11:28 +00:00
<return type= "int" enum= "GDExtensionManager.LoadStatus" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "path" type= "String" />
2021-06-19 15:58:49 +00:00
<description >
2024-01-08 14:44:06 +00:00
Reloads the extension at the given file path. The [param path] needs to point to a valid [GDExtension], otherwise this method may return either [constant LOAD_STATUS_NOT_LOADED] or [constant LOAD_STATUS_FAILED].
[b]Note:[/b] You can only reload extensions in the editor. In release builds, this method always fails and returns [constant LOAD_STATUS_FAILED].
2021-06-19 15:58:49 +00:00
</description>
</method>
<method name= "unload_extension" >
2022-12-07 11:11:28 +00:00
<return type= "int" enum= "GDExtensionManager.LoadStatus" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "path" type= "String" />
2021-06-19 15:58:49 +00:00
<description >
2024-01-08 14:44:06 +00:00
Unloads an extension by file path. The [param path] needs to point to an already loaded [GDExtension], otherwise this method returns [constant LOAD_STATUS_NOT_LOADED].
2021-06-19 15:58:49 +00:00
</description>
</method>
</methods>
2023-08-05 01:34:14 +00:00
<signals >
<signal name= "extensions_reloaded" >
<description >
2024-01-08 14:44:06 +00:00
Emitted after the editor has finished reloading one or more extensions.
2023-08-05 01:34:14 +00:00
</description>
</signal>
</signals>
2021-06-19 15:58:49 +00:00
<constants >
<constant name= "LOAD_STATUS_OK" value= "0" enum= "LoadStatus" >
2024-01-08 14:44:06 +00:00
The extension has loaded successfully.
2021-06-19 15:58:49 +00:00
</constant>
<constant name= "LOAD_STATUS_FAILED" value= "1" enum= "LoadStatus" >
2024-01-08 14:44:06 +00:00
The extension has failed to load, possibly because it does not exist or has missing dependencies.
2021-06-19 15:58:49 +00:00
</constant>
<constant name= "LOAD_STATUS_ALREADY_LOADED" value= "2" enum= "LoadStatus" >
2024-01-08 14:44:06 +00:00
The extension has already been loaded.
2021-06-19 15:58:49 +00:00
</constant>
<constant name= "LOAD_STATUS_NOT_LOADED" value= "3" enum= "LoadStatus" >
2024-01-08 14:44:06 +00:00
The extension has not been loaded.
2021-06-19 15:58:49 +00:00
</constant>
<constant name= "LOAD_STATUS_NEEDS_RESTART" value= "4" enum= "LoadStatus" >
2024-01-08 14:44:06 +00:00
The extension requires the application to restart to fully load.
2021-06-19 15:58:49 +00:00
</constant>
</constants>
</class>