:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/GDExtensionManager.xml. .. _class_GDExtensionManager: GDExtensionManager ================== **Inherits:** :ref:`Object` Provides access to GDExtension functionality. .. rst-class:: classref-introduction-group Description ----------- The GDExtensionManager loads, initializes, and keeps track of all available :ref:`GDExtension` libraries in the project. \ **Note:** Do not worry about GDExtension unless you know what you are doing. .. rst-class:: classref-introduction-group Tutorials --------- - :doc:`GDExtension overview <../tutorials/scripting/gdextension/what_is_gdextension>` - :doc:`GDExtension example in C++ <../tutorials/scripting/cpp/gdextension_cpp_example>` .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ | :ref:`GDExtension` | :ref:`get_extension`\ (\ path\: :ref:`String`\ ) | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_loaded_extensions`\ (\ ) |const| | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_extension_loaded`\ (\ path\: :ref:`String`\ ) |const| | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ | :ref:`LoadStatus` | :ref:`load_extension`\ (\ path\: :ref:`String`\ ) | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ | :ref:`LoadStatus` | :ref:`reload_extension`\ (\ path\: :ref:`String`\ ) | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ | :ref:`LoadStatus` | :ref:`unload_extension`\ (\ path\: :ref:`String`\ ) | +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Signals ------- .. _class_GDExtensionManager_signal_extension_loaded: .. rst-class:: classref-signal **extension_loaded**\ (\ extension\: :ref:`GDExtension`\ ) :ref:`🔗` Emitted after the editor has finished loading a new extension. \ **Note:** This signal is only emitted in editor builds. .. rst-class:: classref-item-separator ---- .. _class_GDExtensionManager_signal_extension_unloading: .. rst-class:: classref-signal **extension_unloading**\ (\ extension\: :ref:`GDExtension`\ ) :ref:`🔗` Emitted before the editor starts unloading an extension. \ **Note:** This signal is only emitted in editor builds. .. rst-class:: classref-item-separator ---- .. _class_GDExtensionManager_signal_extensions_reloaded: .. rst-class:: classref-signal **extensions_reloaded**\ (\ ) :ref:`🔗` Emitted after the editor has finished reloading one or more extensions. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_GDExtensionManager_LoadStatus: .. rst-class:: classref-enumeration enum **LoadStatus**: :ref:`🔗` .. _class_GDExtensionManager_constant_LOAD_STATUS_OK: .. rst-class:: classref-enumeration-constant :ref:`LoadStatus` **LOAD_STATUS_OK** = ``0`` The extension has loaded successfully. .. _class_GDExtensionManager_constant_LOAD_STATUS_FAILED: .. rst-class:: classref-enumeration-constant :ref:`LoadStatus` **LOAD_STATUS_FAILED** = ``1`` The extension has failed to load, possibly because it does not exist or has missing dependencies. .. _class_GDExtensionManager_constant_LOAD_STATUS_ALREADY_LOADED: .. rst-class:: classref-enumeration-constant :ref:`LoadStatus` **LOAD_STATUS_ALREADY_LOADED** = ``2`` The extension has already been loaded. .. _class_GDExtensionManager_constant_LOAD_STATUS_NOT_LOADED: .. rst-class:: classref-enumeration-constant :ref:`LoadStatus` **LOAD_STATUS_NOT_LOADED** = ``3`` The extension has not been loaded. .. _class_GDExtensionManager_constant_LOAD_STATUS_NEEDS_RESTART: .. rst-class:: classref-enumeration-constant :ref:`LoadStatus` **LOAD_STATUS_NEEDS_RESTART** = ``4`` The extension requires the application to restart to fully load. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_GDExtensionManager_method_get_extension: .. rst-class:: classref-method :ref:`GDExtension` **get_extension**\ (\ path\: :ref:`String`\ ) :ref:`🔗` Returns the :ref:`GDExtension` at the given file ``path``, or ``null`` if it has not been loaded or does not exist. .. rst-class:: classref-item-separator ---- .. _class_GDExtensionManager_method_get_loaded_extensions: .. rst-class:: classref-method :ref:`PackedStringArray` **get_loaded_extensions**\ (\ ) |const| :ref:`🔗` Returns the file paths of all currently loaded extensions. .. rst-class:: classref-item-separator ---- .. _class_GDExtensionManager_method_is_extension_loaded: .. rst-class:: classref-method :ref:`bool` **is_extension_loaded**\ (\ path\: :ref:`String`\ ) |const| :ref:`🔗` Returns ``true`` if the extension at the given file ``path`` has already been loaded successfully. See also :ref:`get_loaded_extensions()`. .. rst-class:: classref-item-separator ---- .. _class_GDExtensionManager_method_load_extension: .. rst-class:: classref-method :ref:`LoadStatus` **load_extension**\ (\ path\: :ref:`String`\ ) :ref:`🔗` Loads an extension by absolute file path. The ``path`` needs to point to a valid :ref:`GDExtension`. Returns :ref:`LOAD_STATUS_OK` if successful. .. rst-class:: classref-item-separator ---- .. _class_GDExtensionManager_method_reload_extension: .. rst-class:: classref-method :ref:`LoadStatus` **reload_extension**\ (\ path\: :ref:`String`\ ) :ref:`🔗` Reloads the extension at the given file path. The ``path`` needs to point to a valid :ref:`GDExtension`, otherwise this method may return either :ref:`LOAD_STATUS_NOT_LOADED` or :ref:`LOAD_STATUS_FAILED`. \ **Note:** You can only reload extensions in the editor. In release builds, this method always fails and returns :ref:`LOAD_STATUS_FAILED`. .. rst-class:: classref-item-separator ---- .. _class_GDExtensionManager_method_unload_extension: .. rst-class:: classref-method :ref:`LoadStatus` **unload_extension**\ (\ path\: :ref:`String`\ ) :ref:`🔗` Unloads an extension by file path. The ``path`` needs to point to an already loaded :ref:`GDExtension`, otherwise this method returns :ref:`LOAD_STATUS_NOT_LOADED`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`