class_gdextensionmanager.rst 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/GDExtensionManager.xml.
  6. .. _class_GDExtensionManager:
  7. GDExtensionManager
  8. ==================
  9. **Inherits:** :ref:`Object<class_Object>`
  10. Provides access to GDExtension functionality.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. The GDExtensionManager loads, initializes, and keeps track of all available :ref:`GDExtension<class_GDExtension>` libraries in the project.
  15. \ **Note:** Do not worry about GDExtension unless you know what you are doing.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`GDExtension overview <../tutorials/scripting/gdextension/what_is_gdextension>`
  20. - :doc:`GDExtension example in C++ <../tutorials/scripting/gdextension/gdextension_cpp_example>`
  21. .. rst-class:: classref-reftable-group
  22. Methods
  23. -------
  24. .. table::
  25. :widths: auto
  26. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`GDExtension<class_GDExtension>` | :ref:`get_extension<class_GDExtensionManager_method_get_extension>`\ (\ path\: :ref:`String<class_String>`\ ) |
  28. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_loaded_extensions<class_GDExtensionManager_method_get_loaded_extensions>`\ (\ ) |const| |
  30. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`bool<class_bool>` | :ref:`is_extension_loaded<class_GDExtensionManager_method_is_extension_loaded>`\ (\ path\: :ref:`String<class_String>`\ ) |const| |
  32. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` | :ref:`load_extension<class_GDExtensionManager_method_load_extension>`\ (\ path\: :ref:`String<class_String>`\ ) |
  34. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` | :ref:`reload_extension<class_GDExtensionManager_method_reload_extension>`\ (\ path\: :ref:`String<class_String>`\ ) |
  36. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` | :ref:`unload_extension<class_GDExtensionManager_method_unload_extension>`\ (\ path\: :ref:`String<class_String>`\ ) |
  38. +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+
  39. .. rst-class:: classref-section-separator
  40. ----
  41. .. rst-class:: classref-descriptions-group
  42. Signals
  43. -------
  44. .. _class_GDExtensionManager_signal_extensions_reloaded:
  45. .. rst-class:: classref-signal
  46. **extensions_reloaded**\ (\ ) :ref:`🔗<class_GDExtensionManager_signal_extensions_reloaded>`
  47. Emitted after the editor has finished reloading one or more extensions.
  48. .. rst-class:: classref-section-separator
  49. ----
  50. .. rst-class:: classref-descriptions-group
  51. Enumerations
  52. ------------
  53. .. _enum_GDExtensionManager_LoadStatus:
  54. .. rst-class:: classref-enumeration
  55. enum **LoadStatus**: :ref:`🔗<enum_GDExtensionManager_LoadStatus>`
  56. .. _class_GDExtensionManager_constant_LOAD_STATUS_OK:
  57. .. rst-class:: classref-enumeration-constant
  58. :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` **LOAD_STATUS_OK** = ``0``
  59. The extension has loaded successfully.
  60. .. _class_GDExtensionManager_constant_LOAD_STATUS_FAILED:
  61. .. rst-class:: classref-enumeration-constant
  62. :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` **LOAD_STATUS_FAILED** = ``1``
  63. The extension has failed to load, possibly because it does not exist or has missing dependencies.
  64. .. _class_GDExtensionManager_constant_LOAD_STATUS_ALREADY_LOADED:
  65. .. rst-class:: classref-enumeration-constant
  66. :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` **LOAD_STATUS_ALREADY_LOADED** = ``2``
  67. The extension has already been loaded.
  68. .. _class_GDExtensionManager_constant_LOAD_STATUS_NOT_LOADED:
  69. .. rst-class:: classref-enumeration-constant
  70. :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` **LOAD_STATUS_NOT_LOADED** = ``3``
  71. The extension has not been loaded.
  72. .. _class_GDExtensionManager_constant_LOAD_STATUS_NEEDS_RESTART:
  73. .. rst-class:: classref-enumeration-constant
  74. :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` **LOAD_STATUS_NEEDS_RESTART** = ``4``
  75. The extension requires the application to restart to fully load.
  76. .. rst-class:: classref-section-separator
  77. ----
  78. .. rst-class:: classref-descriptions-group
  79. Method Descriptions
  80. -------------------
  81. .. _class_GDExtensionManager_method_get_extension:
  82. .. rst-class:: classref-method
  83. :ref:`GDExtension<class_GDExtension>` **get_extension**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_GDExtensionManager_method_get_extension>`
  84. Returns the :ref:`GDExtension<class_GDExtension>` at the given file ``path``, or ``null`` if it has not been loaded or does not exist.
  85. .. rst-class:: classref-item-separator
  86. ----
  87. .. _class_GDExtensionManager_method_get_loaded_extensions:
  88. .. rst-class:: classref-method
  89. :ref:`PackedStringArray<class_PackedStringArray>` **get_loaded_extensions**\ (\ ) |const| :ref:`🔗<class_GDExtensionManager_method_get_loaded_extensions>`
  90. Returns the file paths of all currently loaded extensions.
  91. .. rst-class:: classref-item-separator
  92. ----
  93. .. _class_GDExtensionManager_method_is_extension_loaded:
  94. .. rst-class:: classref-method
  95. :ref:`bool<class_bool>` **is_extension_loaded**\ (\ path\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_GDExtensionManager_method_is_extension_loaded>`
  96. Returns ``true`` if the extension at the given file ``path`` has already been loaded successfully. See also :ref:`get_loaded_extensions<class_GDExtensionManager_method_get_loaded_extensions>`.
  97. .. rst-class:: classref-item-separator
  98. ----
  99. .. _class_GDExtensionManager_method_load_extension:
  100. .. rst-class:: classref-method
  101. :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` **load_extension**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_GDExtensionManager_method_load_extension>`
  102. Loads an extension by absolute file path. The ``path`` needs to point to a valid :ref:`GDExtension<class_GDExtension>`. Returns :ref:`LOAD_STATUS_OK<class_GDExtensionManager_constant_LOAD_STATUS_OK>` if successful.
  103. .. rst-class:: classref-item-separator
  104. ----
  105. .. _class_GDExtensionManager_method_reload_extension:
  106. .. rst-class:: classref-method
  107. :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` **reload_extension**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_GDExtensionManager_method_reload_extension>`
  108. Reloads the extension at the given file path. The ``path`` needs to point to a valid :ref:`GDExtension<class_GDExtension>`, otherwise this method may return either :ref:`LOAD_STATUS_NOT_LOADED<class_GDExtensionManager_constant_LOAD_STATUS_NOT_LOADED>` or :ref:`LOAD_STATUS_FAILED<class_GDExtensionManager_constant_LOAD_STATUS_FAILED>`.
  109. \ **Note:** You can only reload extensions in the editor. In release builds, this method always fails and returns :ref:`LOAD_STATUS_FAILED<class_GDExtensionManager_constant_LOAD_STATUS_FAILED>`.
  110. .. rst-class:: classref-item-separator
  111. ----
  112. .. _class_GDExtensionManager_method_unload_extension:
  113. .. rst-class:: classref-method
  114. :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` **unload_extension**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_GDExtensionManager_method_unload_extension>`
  115. Unloads an extension by file path. The ``path`` needs to point to an already loaded :ref:`GDExtension<class_GDExtension>`, otherwise this method returns :ref:`LOAD_STATUS_NOT_LOADED<class_GDExtensionManager_constant_LOAD_STATUS_NOT_LOADED>`.
  116. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  117. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  118. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  119. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  120. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  121. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  122. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  123. .. |void| replace:: :abbr:`void (No return value.)`