class_editorexportplugin.rst 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  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/EditorExportPlugin.xml.
  6. .. _class_EditorExportPlugin:
  7. EditorExportPlugin
  8. ==================
  9. **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :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_private_method__export_begin>` is called at the beginning of the export process and then :ref:`_export_file<class_EditorExportPlugin_private_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-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Export Android plugins <../tutorials/platform/android/android_plugin>`
  20. .. rst-class:: classref-reftable-group
  21. Methods
  22. -------
  23. .. table::
  24. :widths: auto
  25. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`bool<class_bool>` | :ref:`_begin_customize_resources<class_EditorExportPlugin_private_method__begin_customize_resources>` **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`PackedStringArray<class_PackedStringArray>` features **)** |virtual| |const| |
  27. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | :ref:`bool<class_bool>` | :ref:`_begin_customize_scenes<class_EditorExportPlugin_private_method__begin_customize_scenes>` **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`PackedStringArray<class_PackedStringArray>` features **)** |virtual| |const| |
  29. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | :ref:`Resource<class_Resource>` | :ref:`_customize_resource<class_EditorExportPlugin_private_method__customize_resource>` **(** :ref:`Resource<class_Resource>` resource, :ref:`String<class_String>` path **)** |virtual| |
  31. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`Node<class_Node>` | :ref:`_customize_scene<class_EditorExportPlugin_private_method__customize_scene>` **(** :ref:`Node<class_Node>` scene, :ref:`String<class_String>` path **)** |virtual| |
  33. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | void | :ref:`_end_customize_resources<class_EditorExportPlugin_private_method__end_customize_resources>` **(** **)** |virtual| |
  35. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | void | :ref:`_end_customize_scenes<class_EditorExportPlugin_private_method__end_customize_scenes>` **(** **)** |virtual| |
  37. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | void | :ref:`_export_begin<class_EditorExportPlugin_private_method__export_begin>` **(** :ref:`PackedStringArray<class_PackedStringArray>` features, :ref:`bool<class_bool>` is_debug, :ref:`String<class_String>` path, :ref:`int<class_int>` flags **)** |virtual| |
  39. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | void | :ref:`_export_end<class_EditorExportPlugin_private_method__export_end>` **(** **)** |virtual| |
  41. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | void | :ref:`_export_file<class_EditorExportPlugin_private_method__export_file>` **(** :ref:`String<class_String>` path, :ref:`String<class_String>` type, :ref:`PackedStringArray<class_PackedStringArray>` features **)** |virtual| |
  43. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_android_dependencies<class_EditorExportPlugin_private_method__get_android_dependencies>` **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`bool<class_bool>` debug **)** |virtual| |const| |
  45. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_android_dependencies_maven_repos<class_EditorExportPlugin_private_method__get_android_dependencies_maven_repos>` **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`bool<class_bool>` debug **)** |virtual| |const| |
  47. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_android_libraries<class_EditorExportPlugin_private_method__get_android_libraries>` **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`bool<class_bool>` debug **)** |virtual| |const| |
  49. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`String<class_String>` | :ref:`_get_android_manifest_activity_element_contents<class_EditorExportPlugin_private_method__get_android_manifest_activity_element_contents>` **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`bool<class_bool>` debug **)** |virtual| |const| |
  51. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`String<class_String>` | :ref:`_get_android_manifest_application_element_contents<class_EditorExportPlugin_private_method__get_android_manifest_application_element_contents>` **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`bool<class_bool>` debug **)** |virtual| |const| |
  53. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`String<class_String>` | :ref:`_get_android_manifest_element_contents<class_EditorExportPlugin_private_method__get_android_manifest_element_contents>` **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`bool<class_bool>` debug **)** |virtual| |const| |
  55. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`int<class_int>` | :ref:`_get_customization_configuration_hash<class_EditorExportPlugin_private_method__get_customization_configuration_hash>` **(** **)** |virtual| |const| |
  57. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_export_features<class_EditorExportPlugin_private_method__get_export_features>` **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`bool<class_bool>` debug **)** |virtual| |const| |
  59. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`String<class_String>` | :ref:`_get_export_option_warning<class_EditorExportPlugin_private_method__get_export_option_warning>` **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`String<class_String>` option **)** |virtual| |const| |
  61. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_export_options<class_EditorExportPlugin_private_method__get_export_options>` **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform **)** |virtual| |const| |
  63. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`String<class_String>` | :ref:`_get_name<class_EditorExportPlugin_private_method__get_name>` **(** **)** |virtual| |const| |
  65. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`bool<class_bool>` | :ref:`_should_update_export_options<class_EditorExportPlugin_private_method__should_update_export_options>` **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform **)** |virtual| |const| |
  67. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`bool<class_bool>` | :ref:`_supports_platform<class_EditorExportPlugin_private_method__supports_platform>` **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform **)** |virtual| |const| |
  69. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | void | :ref:`add_file<class_EditorExportPlugin_method_add_file>` **(** :ref:`String<class_String>` path, :ref:`PackedByteArray<class_PackedByteArray>` file, :ref:`bool<class_bool>` remap **)** |
  71. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | void | :ref:`add_ios_bundle_file<class_EditorExportPlugin_method_add_ios_bundle_file>` **(** :ref:`String<class_String>` path **)** |
  73. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | void | :ref:`add_ios_cpp_code<class_EditorExportPlugin_method_add_ios_cpp_code>` **(** :ref:`String<class_String>` code **)** |
  75. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | void | :ref:`add_ios_embedded_framework<class_EditorExportPlugin_method_add_ios_embedded_framework>` **(** :ref:`String<class_String>` path **)** |
  77. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | void | :ref:`add_ios_framework<class_EditorExportPlugin_method_add_ios_framework>` **(** :ref:`String<class_String>` path **)** |
  79. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | void | :ref:`add_ios_linker_flags<class_EditorExportPlugin_method_add_ios_linker_flags>` **(** :ref:`String<class_String>` flags **)** |
  81. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | void | :ref:`add_ios_plist_content<class_EditorExportPlugin_method_add_ios_plist_content>` **(** :ref:`String<class_String>` plist_content **)** |
  83. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | void | :ref:`add_ios_project_static_lib<class_EditorExportPlugin_method_add_ios_project_static_lib>` **(** :ref:`String<class_String>` path **)** |
  85. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | void | :ref:`add_macos_plugin_file<class_EditorExportPlugin_method_add_macos_plugin_file>` **(** :ref:`String<class_String>` path **)** |
  87. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | void | :ref:`add_shared_object<class_EditorExportPlugin_method_add_shared_object>` **(** :ref:`String<class_String>` path, :ref:`PackedStringArray<class_PackedStringArray>` tags, :ref:`String<class_String>` target **)** |
  89. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | :ref:`Variant<class_Variant>` | :ref:`get_option<class_EditorExportPlugin_method_get_option>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
  91. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | void | :ref:`skip<class_EditorExportPlugin_method_skip>` **(** **)** |
  93. +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. .. rst-class:: classref-section-separator
  95. ----
  96. .. rst-class:: classref-descriptions-group
  97. Method Descriptions
  98. -------------------
  99. .. _class_EditorExportPlugin_private_method__begin_customize_resources:
  100. .. rst-class:: classref-method
  101. :ref:`bool<class_bool>` **_begin_customize_resources** **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`PackedStringArray<class_PackedStringArray>` features **)** |virtual| |const|
  102. Return ``true`` if this plugin will customize resources based on the platform and features used.
  103. When enabled, :ref:`_get_customization_configuration_hash<class_EditorExportPlugin_private_method__get_customization_configuration_hash>`, :ref:`_customize_resource<class_EditorExportPlugin_private_method__customize_resource>` and :ref:`_customize_scene<class_EditorExportPlugin_private_method__customize_scene>` will be called and must be implemented.
  104. .. rst-class:: classref-item-separator
  105. ----
  106. .. _class_EditorExportPlugin_private_method__begin_customize_scenes:
  107. .. rst-class:: classref-method
  108. :ref:`bool<class_bool>` **_begin_customize_scenes** **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`PackedStringArray<class_PackedStringArray>` features **)** |virtual| |const|
  109. Return true if this plugin will customize scenes based on the platform and features used.
  110. .. rst-class:: classref-item-separator
  111. ----
  112. .. _class_EditorExportPlugin_private_method__customize_resource:
  113. .. rst-class:: classref-method
  114. :ref:`Resource<class_Resource>` **_customize_resource** **(** :ref:`Resource<class_Resource>` resource, :ref:`String<class_String>` path **)** |virtual|
  115. Customize a resource. If changes are made to it, return the same or a new resource. Otherwise, return ``null``.
  116. The *path* argument is only used when customizing an actual file, otherwise this means that this resource is part of another one and it will be empty.
  117. Implementing this method is required if :ref:`_begin_customize_resources<class_EditorExportPlugin_private_method__begin_customize_resources>` returns ``true``.
  118. .. rst-class:: classref-item-separator
  119. ----
  120. .. _class_EditorExportPlugin_private_method__customize_scene:
  121. .. rst-class:: classref-method
  122. :ref:`Node<class_Node>` **_customize_scene** **(** :ref:`Node<class_Node>` scene, :ref:`String<class_String>` path **)** |virtual|
  123. Customize a scene. If changes are made to it, return the same or a new scene. Otherwise, return ``null``. If a new scene is returned, it is up to you to dispose of the old one.
  124. Implementing this method is required if :ref:`_begin_customize_scenes<class_EditorExportPlugin_private_method__begin_customize_scenes>` returns ``true``.
  125. .. rst-class:: classref-item-separator
  126. ----
  127. .. _class_EditorExportPlugin_private_method__end_customize_resources:
  128. .. rst-class:: classref-method
  129. void **_end_customize_resources** **(** **)** |virtual|
  130. This is called when the customization process for resources ends.
  131. .. rst-class:: classref-item-separator
  132. ----
  133. .. _class_EditorExportPlugin_private_method__end_customize_scenes:
  134. .. rst-class:: classref-method
  135. void **_end_customize_scenes** **(** **)** |virtual|
  136. This is called when the customization process for scenes ends.
  137. .. rst-class:: classref-item-separator
  138. ----
  139. .. _class_EditorExportPlugin_private_method__export_begin:
  140. .. rst-class:: classref-method
  141. void **_export_begin** **(** :ref:`PackedStringArray<class_PackedStringArray>` features, :ref:`bool<class_bool>` is_debug, :ref:`String<class_String>` path, :ref:`int<class_int>` flags **)** |virtual|
  142. 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.
  143. .. rst-class:: classref-item-separator
  144. ----
  145. .. _class_EditorExportPlugin_private_method__export_end:
  146. .. rst-class:: classref-method
  147. void **_export_end** **(** **)** |virtual|
  148. Virtual method to be overridden by the user. Called when the export is finished.
  149. .. rst-class:: classref-item-separator
  150. ----
  151. .. _class_EditorExportPlugin_private_method__export_file:
  152. .. rst-class:: classref-method
  153. void **_export_file** **(** :ref:`String<class_String>` path, :ref:`String<class_String>` type, :ref:`PackedStringArray<class_PackedStringArray>` features **)** |virtual|
  154. 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.
  155. Calling :ref:`skip<class_EditorExportPlugin_method_skip>` inside this callback will make the file not included in the export.
  156. .. rst-class:: classref-item-separator
  157. ----
  158. .. _class_EditorExportPlugin_private_method__get_android_dependencies:
  159. .. rst-class:: classref-method
  160. :ref:`PackedStringArray<class_PackedStringArray>` **_get_android_dependencies** **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`bool<class_bool>` debug **)** |virtual| |const|
  161. Virtual method to be overridden by the user. This is called to retrieve the set of Android dependencies provided by this plugin. Each returned Android dependency should have the format of an Android remote binary dependency: ``org.godot.example:my-plugin:0.0.0``\
  162. For more information see `Android documentation on dependencies <https://developer.android.com/build/dependencies?agpversion=4.1#dependency-types>`__.
  163. \ **Note:** Only supported on Android and requires :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build<class_EditorExportPlatformAndroid_property_gradle_build/use_gradle_build>` to be enabled.
  164. .. rst-class:: classref-item-separator
  165. ----
  166. .. _class_EditorExportPlugin_private_method__get_android_dependencies_maven_repos:
  167. .. rst-class:: classref-method
  168. :ref:`PackedStringArray<class_PackedStringArray>` **_get_android_dependencies_maven_repos** **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`bool<class_bool>` debug **)** |virtual| |const|
  169. Virtual method to be overridden by the user. This is called to retrieve the URLs of Maven repositories for the set of Android dependencies provided by this plugin.
  170. For more information see `Gradle documentation on dependency management <https://docs.gradle.org/current/userguide/dependency_management.html#sec:maven_repo>`__.
  171. \ **Note:** Google's Maven repo and the Maven Central repo are already included by default.
  172. \ **Note:** Only supported on Android and requires :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build<class_EditorExportPlatformAndroid_property_gradle_build/use_gradle_build>` to be enabled.
  173. .. rst-class:: classref-item-separator
  174. ----
  175. .. _class_EditorExportPlugin_private_method__get_android_libraries:
  176. .. rst-class:: classref-method
  177. :ref:`PackedStringArray<class_PackedStringArray>` **_get_android_libraries** **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`bool<class_bool>` debug **)** |virtual| |const|
  178. Virtual method to be overridden by the user. This is called to retrieve the local paths of the Android libraries archive (AAR) files provided by this plugin.
  179. \ **Note:** Relative paths **must** be relative to Godot's ``res://addons/`` directory. For example, an AAR file located under ``res://addons/hello_world_plugin/HelloWorld.release.aar`` can be returned as an absolute path using ``res://addons/hello_world_plugin/HelloWorld.release.aar`` or a relative path using ``hello_world_plugin/HelloWorld.release.aar``.
  180. \ **Note:** Only supported on Android and requires :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build<class_EditorExportPlatformAndroid_property_gradle_build/use_gradle_build>` to be enabled.
  181. .. rst-class:: classref-item-separator
  182. ----
  183. .. _class_EditorExportPlugin_private_method__get_android_manifest_activity_element_contents:
  184. .. rst-class:: classref-method
  185. :ref:`String<class_String>` **_get_android_manifest_activity_element_contents** **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`bool<class_bool>` debug **)** |virtual| |const|
  186. Virtual method to be overridden by the user. This is used at export time to update the contents of the ``activity`` element in the generated Android manifest.
  187. \ **Note:** Only supported on Android and requires :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build<class_EditorExportPlatformAndroid_property_gradle_build/use_gradle_build>` to be enabled.
  188. .. rst-class:: classref-item-separator
  189. ----
  190. .. _class_EditorExportPlugin_private_method__get_android_manifest_application_element_contents:
  191. .. rst-class:: classref-method
  192. :ref:`String<class_String>` **_get_android_manifest_application_element_contents** **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`bool<class_bool>` debug **)** |virtual| |const|
  193. Virtual method to be overridden by the user. This is used at export time to update the contents of the ``application`` element in the generated Android manifest.
  194. \ **Note:** Only supported on Android and requires :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build<class_EditorExportPlatformAndroid_property_gradle_build/use_gradle_build>` to be enabled.
  195. .. rst-class:: classref-item-separator
  196. ----
  197. .. _class_EditorExportPlugin_private_method__get_android_manifest_element_contents:
  198. .. rst-class:: classref-method
  199. :ref:`String<class_String>` **_get_android_manifest_element_contents** **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`bool<class_bool>` debug **)** |virtual| |const|
  200. Virtual method to be overridden by the user. This is used at export time to update the contents of the ``manifest`` element in the generated Android manifest.
  201. \ **Note:** Only supported on Android and requires :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build<class_EditorExportPlatformAndroid_property_gradle_build/use_gradle_build>` to be enabled.
  202. .. rst-class:: classref-item-separator
  203. ----
  204. .. _class_EditorExportPlugin_private_method__get_customization_configuration_hash:
  205. .. rst-class:: classref-method
  206. :ref:`int<class_int>` **_get_customization_configuration_hash** **(** **)** |virtual| |const|
  207. Return a hash based on the configuration passed (for both scenes and resources). This helps keep separate caches for separate export configurations.
  208. Implementing this method is required if :ref:`_begin_customize_resources<class_EditorExportPlugin_private_method__begin_customize_resources>` returns ``true``.
  209. .. rst-class:: classref-item-separator
  210. ----
  211. .. _class_EditorExportPlugin_private_method__get_export_features:
  212. .. rst-class:: classref-method
  213. :ref:`PackedStringArray<class_PackedStringArray>` **_get_export_features** **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`bool<class_bool>` debug **)** |virtual| |const|
  214. Return a :ref:`PackedStringArray<class_PackedStringArray>` of additional features this preset, for the given ``platform``, should have.
  215. .. rst-class:: classref-item-separator
  216. ----
  217. .. _class_EditorExportPlugin_private_method__get_export_option_warning:
  218. .. rst-class:: classref-method
  219. :ref:`String<class_String>` **_get_export_option_warning** **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`String<class_String>` option **)** |virtual| |const|
  220. Check the requirements for the given ``option`` and return a non-empty warning string if they are not met.
  221. \ **Note:** Use :ref:`get_option<class_EditorExportPlugin_method_get_option>` to check the value of the export options.
  222. .. rst-class:: classref-item-separator
  223. ----
  224. .. _class_EditorExportPlugin_private_method__get_export_options:
  225. .. rst-class:: classref-method
  226. :ref:`Dictionary[]<class_Dictionary>` **_get_export_options** **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform **)** |virtual| |const|
  227. Return a list of export options that can be configured for this export plugin.
  228. Each element in the return value is a :ref:`Dictionary<class_Dictionary>` with the following keys:
  229. - ``option``: A dictionary with the structure documented by :ref:`Object.get_property_list<class_Object_method_get_property_list>`, but all keys are optional.
  230. - ``default_value``: The default value for this option.
  231. - ``update_visibility``: An optional boolean value. If set to ``true``, the preset will emit :ref:`Object.property_list_changed<class_Object_signal_property_list_changed>` when the option is changed.
  232. .. rst-class:: classref-item-separator
  233. ----
  234. .. _class_EditorExportPlugin_private_method__get_name:
  235. .. rst-class:: classref-method
  236. :ref:`String<class_String>` **_get_name** **(** **)** |virtual| |const|
  237. Return the name identifier of this plugin (for future identification by the exporter). The plugins are sorted by name before exporting.
  238. Implementing this method is required.
  239. .. rst-class:: classref-item-separator
  240. ----
  241. .. _class_EditorExportPlugin_private_method__should_update_export_options:
  242. .. rst-class:: classref-method
  243. :ref:`bool<class_bool>` **_should_update_export_options** **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform **)** |virtual| |const|
  244. Return ``true``, if the result of :ref:`_get_export_options<class_EditorExportPlugin_private_method__get_export_options>` has changed and the export options of preset corresponding to ``platform`` should be updated.
  245. .. rst-class:: classref-item-separator
  246. ----
  247. .. _class_EditorExportPlugin_private_method__supports_platform:
  248. .. rst-class:: classref-method
  249. :ref:`bool<class_bool>` **_supports_platform** **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform **)** |virtual| |const|
  250. Return ``true`` if the plugin supports the given ``platform``.
  251. .. rst-class:: classref-item-separator
  252. ----
  253. .. _class_EditorExportPlugin_method_add_file:
  254. .. rst-class:: classref-method
  255. void **add_file** **(** :ref:`String<class_String>` path, :ref:`PackedByteArray<class_PackedByteArray>` file, :ref:`bool<class_bool>` remap **)**
  256. 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.
  257. When called inside :ref:`_export_file<class_EditorExportPlugin_private_method__export_file>` and ``remap`` is ``true``, the current file will not be exported, but instead remapped to this custom file. ``remap`` is ignored when called in other places.
  258. .. rst-class:: classref-item-separator
  259. ----
  260. .. _class_EditorExportPlugin_method_add_ios_bundle_file:
  261. .. rst-class:: classref-method
  262. void **add_ios_bundle_file** **(** :ref:`String<class_String>` path **)**
  263. Adds an iOS bundle file from the given ``path`` to the exported project.
  264. .. rst-class:: classref-item-separator
  265. ----
  266. .. _class_EditorExportPlugin_method_add_ios_cpp_code:
  267. .. rst-class:: classref-method
  268. void **add_ios_cpp_code** **(** :ref:`String<class_String>` code **)**
  269. Adds a C++ code to the iOS export. The final code is created from the code appended by each active export plugin.
  270. .. rst-class:: classref-item-separator
  271. ----
  272. .. _class_EditorExportPlugin_method_add_ios_embedded_framework:
  273. .. rst-class:: classref-method
  274. void **add_ios_embedded_framework** **(** :ref:`String<class_String>` path **)**
  275. Adds a dynamic library (\*.dylib, \*.framework) to Linking Phase in iOS's Xcode project and embeds it into resulting binary.
  276. \ **Note:** For static libraries (\*.a) works in same way as :ref:`add_ios_framework<class_EditorExportPlugin_method_add_ios_framework>`.
  277. \ **Note:** This method should not be used for System libraries as they are already present on the device.
  278. .. rst-class:: classref-item-separator
  279. ----
  280. .. _class_EditorExportPlugin_method_add_ios_framework:
  281. .. rst-class:: classref-method
  282. void **add_ios_framework** **(** :ref:`String<class_String>` path **)**
  283. Adds a static library (\*.a) or dynamic library (\*.dylib, \*.framework) to Linking Phase in iOS's Xcode project.
  284. .. rst-class:: classref-item-separator
  285. ----
  286. .. _class_EditorExportPlugin_method_add_ios_linker_flags:
  287. .. rst-class:: classref-method
  288. void **add_ios_linker_flags** **(** :ref:`String<class_String>` flags **)**
  289. Adds linker flags for the iOS export.
  290. .. rst-class:: classref-item-separator
  291. ----
  292. .. _class_EditorExportPlugin_method_add_ios_plist_content:
  293. .. rst-class:: classref-method
  294. void **add_ios_plist_content** **(** :ref:`String<class_String>` plist_content **)**
  295. Adds content for iOS Property List files.
  296. .. rst-class:: classref-item-separator
  297. ----
  298. .. _class_EditorExportPlugin_method_add_ios_project_static_lib:
  299. .. rst-class:: classref-method
  300. void **add_ios_project_static_lib** **(** :ref:`String<class_String>` path **)**
  301. Adds a static lib from the given ``path`` to the iOS project.
  302. .. rst-class:: classref-item-separator
  303. ----
  304. .. _class_EditorExportPlugin_method_add_macos_plugin_file:
  305. .. rst-class:: classref-method
  306. void **add_macos_plugin_file** **(** :ref:`String<class_String>` path **)**
  307. Adds file or directory matching ``path`` to ``PlugIns`` directory of macOS app bundle.
  308. \ **Note:** This is useful only for macOS exports.
  309. .. rst-class:: classref-item-separator
  310. ----
  311. .. _class_EditorExportPlugin_method_add_shared_object:
  312. .. rst-class:: classref-method
  313. void **add_shared_object** **(** :ref:`String<class_String>` path, :ref:`PackedStringArray<class_PackedStringArray>` tags, :ref:`String<class_String>` target **)**
  314. Adds a shared object or a directory containing only shared objects with the given ``tags`` and destination ``path``.
  315. \ **Note:** In case of macOS exports, those shared objects will be added to ``Frameworks`` directory of app bundle.
  316. In case of a directory code-sign will error if you place non code object in directory.
  317. .. rst-class:: classref-item-separator
  318. ----
  319. .. _class_EditorExportPlugin_method_get_option:
  320. .. rst-class:: classref-method
  321. :ref:`Variant<class_Variant>` **get_option** **(** :ref:`StringName<class_StringName>` name **)** |const|
  322. Returns the current value of an export option supplied by :ref:`_get_export_options<class_EditorExportPlugin_private_method__get_export_options>`.
  323. .. rst-class:: classref-item-separator
  324. ----
  325. .. _class_EditorExportPlugin_method_skip:
  326. .. rst-class:: classref-method
  327. void **skip** **(** **)**
  328. To be called inside :ref:`_export_file<class_EditorExportPlugin_private_method__export_file>`. Skips the current file, so it's not included in the export.
  329. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  330. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  331. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  332. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  333. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  334. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  335. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`