class_gdextension.rst 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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/GDExtension.xml.
  6. .. _class_GDExtension:
  7. GDExtension
  8. ===========
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A native library for GDExtension.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. The **GDExtension** resource type represents a `shared library <https://en.wikipedia.org/wiki/Shared_library>`__ which can expand the functionality of the engine. The :ref:`GDExtensionManager<class_GDExtensionManager>` singleton is responsible for loading, reloading, and unloading **GDExtension** resources.
  15. \ **Note:** GDExtension itself is not a scripting language and has no relation to :ref:`GDScript<class_GDScript>` resources.
  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:`InitializationLevel<enum_GDExtension_InitializationLevel>` | :ref:`get_minimum_library_initialization_level<class_GDExtension_method_get_minimum_library_initialization_level>`\ (\ ) |const| |
  28. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`is_library_open<class_GDExtension_method_is_library_open>`\ (\ ) |const| |
  30. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  31. .. rst-class:: classref-section-separator
  32. ----
  33. .. rst-class:: classref-descriptions-group
  34. Enumerations
  35. ------------
  36. .. _enum_GDExtension_InitializationLevel:
  37. .. rst-class:: classref-enumeration
  38. enum **InitializationLevel**: :ref:`🔗<enum_GDExtension_InitializationLevel>`
  39. .. _class_GDExtension_constant_INITIALIZATION_LEVEL_CORE:
  40. .. rst-class:: classref-enumeration-constant
  41. :ref:`InitializationLevel<enum_GDExtension_InitializationLevel>` **INITIALIZATION_LEVEL_CORE** = ``0``
  42. The library is initialized at the same time as the core features of the engine.
  43. .. _class_GDExtension_constant_INITIALIZATION_LEVEL_SERVERS:
  44. .. rst-class:: classref-enumeration-constant
  45. :ref:`InitializationLevel<enum_GDExtension_InitializationLevel>` **INITIALIZATION_LEVEL_SERVERS** = ``1``
  46. The library is initialized at the same time as the engine's servers (such as :ref:`RenderingServer<class_RenderingServer>` or :ref:`PhysicsServer3D<class_PhysicsServer3D>`).
  47. .. _class_GDExtension_constant_INITIALIZATION_LEVEL_SCENE:
  48. .. rst-class:: classref-enumeration-constant
  49. :ref:`InitializationLevel<enum_GDExtension_InitializationLevel>` **INITIALIZATION_LEVEL_SCENE** = ``2``
  50. The library is initialized at the same time as the engine's scene-related classes.
  51. .. _class_GDExtension_constant_INITIALIZATION_LEVEL_EDITOR:
  52. .. rst-class:: classref-enumeration-constant
  53. :ref:`InitializationLevel<enum_GDExtension_InitializationLevel>` **INITIALIZATION_LEVEL_EDITOR** = ``3``
  54. The library is initialized at the same time as the engine's editor classes. Only happens when loading the GDExtension in the editor.
  55. .. rst-class:: classref-section-separator
  56. ----
  57. .. rst-class:: classref-descriptions-group
  58. Method Descriptions
  59. -------------------
  60. .. _class_GDExtension_method_get_minimum_library_initialization_level:
  61. .. rst-class:: classref-method
  62. :ref:`InitializationLevel<enum_GDExtension_InitializationLevel>` **get_minimum_library_initialization_level**\ (\ ) |const| :ref:`🔗<class_GDExtension_method_get_minimum_library_initialization_level>`
  63. Returns the lowest level required for this extension to be properly initialized (see the :ref:`InitializationLevel<enum_GDExtension_InitializationLevel>` enum).
  64. .. rst-class:: classref-item-separator
  65. ----
  66. .. _class_GDExtension_method_is_library_open:
  67. .. rst-class:: classref-method
  68. :ref:`bool<class_bool>` **is_library_open**\ (\ ) |const| :ref:`🔗<class_GDExtension_method_is_library_open>`
  69. Returns ``true`` if this extension's library has been opened.
  70. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  71. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  72. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  73. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  74. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  75. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  76. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  77. .. |void| replace:: :abbr:`void (No return value.)`