Class reference
GDExtensionManager
Inherits Object
Provides access to GDExtension functionality.
Description
The GDExtensionManager loads, initializes, and keeps track of all available GDExtension libraries in the project. Note: Do not worry about GDExtension unless you know what you are doing.
Methods
GDExtension get_extension(String path)
GDExtension get_extension(String path)Returns the GDExtension at the given file path, or null if it has not been loaded or does not exist.
PackedStringArray get_loaded_extensions() const
PackedStringArray get_loaded_extensions() constReturns the file paths of all currently loaded extensions.
bool is_extension_loaded(String path) const
bool is_extension_loaded(String path) constReturns true if the extension at the given file path has already been loaded successfully. See also get_loaded_extensions().
int load_extension(String path)
int load_extension(String path)Loads an extension by absolute file path. The path needs to point to a valid GDExtension. Returns LOAD_STATUS_OK if successful.
int reload_extension(String path)
int reload_extension(String path)Reloads the extension at the given file path. The path needs to point to a valid GDExtension, otherwise this method may return either LOAD_STATUS_NOT_LOADED or LOAD_STATUS_FAILED. Note: You can only reload extensions in the editor. In release builds, this method always fails and returns LOAD_STATUS_FAILED.
int unload_extension(String path)
int unload_extension(String path)Unloads an extension by file path. The path needs to point to an already loaded GDExtension, otherwise this method returns LOAD_STATUS_NOT_LOADED.
Signals
extension_loaded(GDExtension extension)
GDExtension extension)Emitted after the editor has finished loading a new extension. Note: This signal is only emitted in editor builds.
extension_unloading(GDExtension extension)
GDExtension extension)Emitted before the editor starts unloading an extension. Note: This signal is only emitted in editor builds.
extensions_reloaded()
Emitted after the editor has finished reloading one or more extensions.
Constants
LOAD_STATUS_OK = 0
The extension has loaded successfully.
LOAD_STATUS_FAILED = 1
The extension has failed to load, possibly because it does not exist or has missing dependencies.
LOAD_STATUS_ALREADY_LOADED = 2
The extension has already been loaded.
LOAD_STATUS_NOT_LOADED = 3
The extension has not been loaded.
LOAD_STATUS_NEEDS_RESTART = 4
The extension requires the application to restart to fully load.