Debian Codegraph @

doc/classes/GDExtensionManager.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <class name="GDExtensionManager" inherits="Object" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 Provides access to GDExtension functionality.
5 </brief_description>
6 <description>
7 The GDExtensionManager loads, initializes, and keeps track of all available [GDExtension] libraries in the project.
8 [b]Note:[/b] Do not worry about GDExtension unless you know what you are doing.
9 </description>
10 <tutorials>
11 <link title="GDExtension overview">$DOCS_URL/tutorials/scripting/gdextension/what_is_gdextension.html</link>
12 <link title="GDExtension example in C++">$DOCS_URL/tutorials/scripting/cpp/gdextension_cpp_example.html</link>
13 </tutorials>
14 <methods>
15 <method name="get_extension">
16 <return type="GDExtension" />
17 <param index="0" name="path" type="String" />
18 <description>
19 Returns the [GDExtension] at the given file [param path], or [code]null[/code] if it has not been loaded or does not exist.
20 </description>
21 </method>
22 <method name="get_loaded_extensions" qualifiers="const">
23 <return type="PackedStringArray" />
24 <description>
25 Returns the file paths of all currently loaded extensions.
26 </description>
27 </method>
28 <method name="is_extension_loaded" qualifiers="const">
29 <return type="bool" />
30 <param index="0" name="path" type="String" />
31 <description>
32 Returns [code]true[/code] if the extension at the given file [param path] has already been loaded successfully. See also [method get_loaded_extensions].
33 </description>
34 </method>
35 <method name="load_extension">
36 <return type="int" enum="GDExtensionManager.LoadStatus" />
37 <param index="0" name="path" type="String" />
38 <description>
39 Loads an extension by absolute file path. The [param path] needs to point to a valid [GDExtension]. Returns [constant LOAD_STATUS_OK] if successful.
40 </description>
41 </method>
42 <method name="load_extension_from_function">
43 <return type="int" enum="GDExtensionManager.LoadStatus" />
44 <param index="0" name="path" type="String" />
45 <param index="1" name="init_func" type="const GDExtensionInitializationFunction*" />
46 <description>
47 Loads the extension already in address space via the given path and initialization function. The [param path] needs to be unique and start with [code]"libgodot://"[/code]. Returns [constant LOAD_STATUS_OK] if successful.
48 </description>
49 </method>
50 <method name="reload_extension">
51 <return type="int" enum="GDExtensionManager.LoadStatus" />
52 <param index="0" name="path" type="String" />
53 <description>
54 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].
55 [b]Note:[/b] You can only reload extensions in the editor. In release builds, this method always fails and returns [constant LOAD_STATUS_FAILED].
56 </description>
57 </method>
58 <method name="unload_extension">
59 <return type="int" enum="GDExtensionManager.LoadStatus" />
60 <param index="0" name="path" type="String" />
61 <description>
62 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].
63 </description>
64 </method>
65 </methods>
66 <signals>
67 <signal name="extension_loaded">
68 <param index="0" name="extension" type="GDExtension" />
69 <description>
70 Emitted after the editor has finished loading a new extension.
71 [b]Note:[/b] This signal is only emitted in editor builds.
72 </description>
73 </signal>
74 <signal name="extension_unloading">
75 <param index="0" name="extension" type="GDExtension" />
76 <description>
77 Emitted before the editor starts unloading an extension.
78 [b]Note:[/b] This signal is only emitted in editor builds.
79 </description>
80 </signal>
81 <signal name="extensions_reloaded">
82 <description>
83 Emitted after the editor has finished reloading one or more extensions.
84 </description>
85 </signal>
86 </signals>
87 <constants>
88 <constant name="LOAD_STATUS_OK" value="0" enum="LoadStatus">
89 The extension has loaded successfully.
90 </constant>
91 <constant name="LOAD_STATUS_FAILED" value="1" enum="LoadStatus">
92 The extension has failed to load, possibly because it does not exist or has missing dependencies.
93 </constant>
94 <constant name="LOAD_STATUS_ALREADY_LOADED" value="2" enum="LoadStatus">
95 The extension has already been loaded.
96 </constant>
97 <constant name="LOAD_STATUS_NOT_LOADED" value="3" enum="LoadStatus">
98 The extension has not been loaded.
99 </constant>
100 <constant name="LOAD_STATUS_NEEDS_RESTART" value="4" enum="LoadStatus">
101 The extension requires the application to restart to fully load.
102 </constant>
103 </constants>
104 </class>