class_editorexportplugin.rst 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  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/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/EditorExportPlugin.xml.
  6. .. _class_EditorExportPlugin:
  7. EditorExportPlugin
  8. ==================
  9. **Inherits:** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. A script that is executed when exporting the project.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. **EditorExportPlugin**\ s are automatically invoked whenever the user exports the project. Their most common use is to determine what files are being included in the exported project. For each plugin, :ref:`_export_begin<class_EditorExportPlugin_method__export_begin>` is called at the beginning of the export process and then :ref:`_export_file<class_EditorExportPlugin_method__export_file>` is called for each exported file.
  15. To use **EditorExportPlugin**, register it using the :ref:`EditorPlugin.add_export_plugin<class_EditorPlugin_method_add_export_plugin>` method first.
  16. .. rst-class:: classref-reftable-group
  17. Methods
  18. -------
  19. .. table::
  20. :widths: auto
  21. +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | void | :ref:`_export_begin<class_EditorExportPlugin_method__export_begin>` **(** :ref:`PoolStringArray<class_PoolStringArray>` features, :ref:`bool<class_bool>` is_debug, :ref:`String<class_String>` path, :ref:`int<class_int>` flags **)** |virtual| |
  23. +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | void | :ref:`_export_end<class_EditorExportPlugin_method__export_end>` **(** **)** |virtual| |
  25. +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | void | :ref:`_export_file<class_EditorExportPlugin_method__export_file>` **(** :ref:`String<class_String>` path, :ref:`String<class_String>` type, :ref:`PoolStringArray<class_PoolStringArray>` features **)** |virtual| |
  27. +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | void | :ref:`add_file<class_EditorExportPlugin_method_add_file>` **(** :ref:`String<class_String>` path, :ref:`PoolByteArray<class_PoolByteArray>` file, :ref:`bool<class_bool>` remap **)** |
  29. +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | void | :ref:`add_ios_bundle_file<class_EditorExportPlugin_method_add_ios_bundle_file>` **(** :ref:`String<class_String>` path **)** |
  31. +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | void | :ref:`add_ios_cpp_code<class_EditorExportPlugin_method_add_ios_cpp_code>` **(** :ref:`String<class_String>` code **)** |
  33. +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | void | :ref:`add_ios_embedded_framework<class_EditorExportPlugin_method_add_ios_embedded_framework>` **(** :ref:`String<class_String>` path **)** |
  35. +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | void | :ref:`add_ios_framework<class_EditorExportPlugin_method_add_ios_framework>` **(** :ref:`String<class_String>` path **)** |
  37. +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | void | :ref:`add_ios_linker_flags<class_EditorExportPlugin_method_add_ios_linker_flags>` **(** :ref:`String<class_String>` flags **)** |
  39. +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | void | :ref:`add_ios_plist_content<class_EditorExportPlugin_method_add_ios_plist_content>` **(** :ref:`String<class_String>` plist_content **)** |
  41. +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | void | :ref:`add_ios_project_static_lib<class_EditorExportPlugin_method_add_ios_project_static_lib>` **(** :ref:`String<class_String>` path **)** |
  43. +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | void | :ref:`add_osx_plugin_file<class_EditorExportPlugin_method_add_osx_plugin_file>` **(** :ref:`String<class_String>` path **)** |
  45. +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | void | :ref:`add_shared_object<class_EditorExportPlugin_method_add_shared_object>` **(** :ref:`String<class_String>` path, :ref:`PoolStringArray<class_PoolStringArray>` tags **)** |
  47. +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | void | :ref:`skip<class_EditorExportPlugin_method_skip>` **(** **)** |
  49. +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. .. rst-class:: classref-section-separator
  51. ----
  52. .. rst-class:: classref-descriptions-group
  53. Method Descriptions
  54. -------------------
  55. .. _class_EditorExportPlugin_method__export_begin:
  56. .. rst-class:: classref-method
  57. void **_export_begin** **(** :ref:`PoolStringArray<class_PoolStringArray>` features, :ref:`bool<class_bool>` is_debug, :ref:`String<class_String>` path, :ref:`int<class_int>` flags **)** |virtual|
  58. Virtual method to be overridden by the user. It is called when the export starts and provides all information about the export. ``features`` is the list of features for the export, ``is_debug`` is ``true`` for debug builds, ``path`` is the target path for the exported project. ``flags`` is only used when running a runnable profile, e.g. when using native run on Android.
  59. .. rst-class:: classref-item-separator
  60. ----
  61. .. _class_EditorExportPlugin_method__export_end:
  62. .. rst-class:: classref-method
  63. void **_export_end** **(** **)** |virtual|
  64. Virtual method to be overridden by the user. Called when the export is finished.
  65. .. rst-class:: classref-item-separator
  66. ----
  67. .. _class_EditorExportPlugin_method__export_file:
  68. .. rst-class:: classref-method
  69. void **_export_file** **(** :ref:`String<class_String>` path, :ref:`String<class_String>` type, :ref:`PoolStringArray<class_PoolStringArray>` features **)** |virtual|
  70. Virtual method to be overridden by the user. Called for each exported file, providing arguments that can be used to identify the file. ``path`` is the path of the file, ``type`` is the :ref:`Resource<class_Resource>` represented by the file (e.g. :ref:`PackedScene<class_PackedScene>`) and ``features`` is the list of features for the export.
  71. Calling :ref:`skip<class_EditorExportPlugin_method_skip>` inside this callback will make the file not included in the export.
  72. .. rst-class:: classref-item-separator
  73. ----
  74. .. _class_EditorExportPlugin_method_add_file:
  75. .. rst-class:: classref-method
  76. void **add_file** **(** :ref:`String<class_String>` path, :ref:`PoolByteArray<class_PoolByteArray>` file, :ref:`bool<class_bool>` remap **)**
  77. Adds a custom file to be exported. ``path`` is the virtual path that can be used to load the file, ``file`` is the binary data of the file. If ``remap`` is ``true``, file will not be exported, but instead remapped to the given ``path``.
  78. .. rst-class:: classref-item-separator
  79. ----
  80. .. _class_EditorExportPlugin_method_add_ios_bundle_file:
  81. .. rst-class:: classref-method
  82. void **add_ios_bundle_file** **(** :ref:`String<class_String>` path **)**
  83. Adds an iOS bundle file from the given ``path`` to the exported project.
  84. .. rst-class:: classref-item-separator
  85. ----
  86. .. _class_EditorExportPlugin_method_add_ios_cpp_code:
  87. .. rst-class:: classref-method
  88. void **add_ios_cpp_code** **(** :ref:`String<class_String>` code **)**
  89. Adds a C++ code to the iOS export. The final code is created from the code appended by each active export plugin.
  90. .. rst-class:: classref-item-separator
  91. ----
  92. .. _class_EditorExportPlugin_method_add_ios_embedded_framework:
  93. .. rst-class:: classref-method
  94. void **add_ios_embedded_framework** **(** :ref:`String<class_String>` path **)**
  95. Adds a dynamic library (\*.dylib, \*.framework) to Linking Phase in iOS's Xcode project and embeds it into resulting binary.
  96. \ **Note:** For static libraries (\*.a) works in same way as :ref:`add_ios_framework<class_EditorExportPlugin_method_add_ios_framework>`.
  97. This method should not be used for System libraries as they are already present on the device.
  98. .. rst-class:: classref-item-separator
  99. ----
  100. .. _class_EditorExportPlugin_method_add_ios_framework:
  101. .. rst-class:: classref-method
  102. void **add_ios_framework** **(** :ref:`String<class_String>` path **)**
  103. Adds a static library (\*.a) or dynamic library (\*.dylib, \*.framework) to Linking Phase in iOS's Xcode project.
  104. .. rst-class:: classref-item-separator
  105. ----
  106. .. _class_EditorExportPlugin_method_add_ios_linker_flags:
  107. .. rst-class:: classref-method
  108. void **add_ios_linker_flags** **(** :ref:`String<class_String>` flags **)**
  109. Adds linker flags for the iOS export.
  110. .. rst-class:: classref-item-separator
  111. ----
  112. .. _class_EditorExportPlugin_method_add_ios_plist_content:
  113. .. rst-class:: classref-method
  114. void **add_ios_plist_content** **(** :ref:`String<class_String>` plist_content **)**
  115. Adds content for iOS Property List files.
  116. .. rst-class:: classref-item-separator
  117. ----
  118. .. _class_EditorExportPlugin_method_add_ios_project_static_lib:
  119. .. rst-class:: classref-method
  120. void **add_ios_project_static_lib** **(** :ref:`String<class_String>` path **)**
  121. Adds a static lib from the given ``path`` to the iOS project.
  122. .. rst-class:: classref-item-separator
  123. ----
  124. .. _class_EditorExportPlugin_method_add_osx_plugin_file:
  125. .. rst-class:: classref-method
  126. void **add_osx_plugin_file** **(** :ref:`String<class_String>` path **)**
  127. Adds file or directory matching ``path`` to ``PlugIns`` directory of macOS app bundle.
  128. \ **Note:** This is useful only for macOS exports.
  129. .. rst-class:: classref-item-separator
  130. ----
  131. .. _class_EditorExportPlugin_method_add_shared_object:
  132. .. rst-class:: classref-method
  133. void **add_shared_object** **(** :ref:`String<class_String>` path, :ref:`PoolStringArray<class_PoolStringArray>` tags **)**
  134. Adds a shared object or a directory containing only shared objects with the given ``tags`` and destination ``path``.
  135. \ **Note:** In case of macOS exports, those shared objects will be added to ``Frameworks`` directory of app bundle.
  136. In case of a directory code-sign will error if you place non code object in directory.
  137. .. rst-class:: classref-item-separator
  138. ----
  139. .. _class_EditorExportPlugin_method_skip:
  140. .. rst-class:: classref-method
  141. void **skip** **(** **)**
  142. To be called inside :ref:`_export_file<class_EditorExportPlugin_method__export_file>`. Skips the current file, so it's not included in the export.
  143. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  144. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  145. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  146. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`