EditorExportPlugin.xml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="EditorExportPlugin" inherits="Reference" version="3.6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. A script that is executed when exporting the project.
  5. </brief_description>
  6. <description>
  7. [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, [method _export_begin] is called at the beginning of the export process and then [method _export_file] is called for each exported file.
  8. To use [EditorExportPlugin], register it using the [method EditorPlugin.add_export_plugin] method first.
  9. </description>
  10. <tutorials>
  11. </tutorials>
  12. <methods>
  13. <method name="_export_begin" qualifiers="virtual">
  14. <return type="void" />
  15. <argument index="0" name="features" type="PoolStringArray" />
  16. <argument index="1" name="is_debug" type="bool" />
  17. <argument index="2" name="path" type="String" />
  18. <argument index="3" name="flags" type="int" />
  19. <description>
  20. Virtual method to be overridden by the user. It is called when the export starts and provides all information about the export. [code]features[/code] is the list of features for the export, [code]is_debug[/code] is [code]true[/code] for debug builds, [code]path[/code] is the target path for the exported project. [code]flags[/code] is only used when running a runnable profile, e.g. when using native run on Android.
  21. </description>
  22. </method>
  23. <method name="_export_end" qualifiers="virtual">
  24. <return type="void" />
  25. <description>
  26. Virtual method to be overridden by the user. Called when the export is finished.
  27. </description>
  28. </method>
  29. <method name="_export_file" qualifiers="virtual">
  30. <return type="void" />
  31. <argument index="0" name="path" type="String" />
  32. <argument index="1" name="type" type="String" />
  33. <argument index="2" name="features" type="PoolStringArray" />
  34. <description>
  35. Virtual method to be overridden by the user. Called for each exported file, providing arguments that can be used to identify the file. [code]path[/code] is the path of the file, [code]type[/code] is the [Resource] represented by the file (e.g. [PackedScene]) and [code]features[/code] is the list of features for the export.
  36. Calling [method skip] inside this callback will make the file not included in the export.
  37. </description>
  38. </method>
  39. <method name="add_file">
  40. <return type="void" />
  41. <argument index="0" name="path" type="String" />
  42. <argument index="1" name="file" type="PoolByteArray" />
  43. <argument index="2" name="remap" type="bool" />
  44. <description>
  45. Adds a custom file to be exported. [code]path[/code] is the virtual path that can be used to load the file, [code]file[/code] is the binary data of the file. If [code]remap[/code] is [code]true[/code], file will not be exported, but instead remapped to the given [code]path[/code].
  46. </description>
  47. </method>
  48. <method name="add_ios_bundle_file">
  49. <return type="void" />
  50. <argument index="0" name="path" type="String" />
  51. <description>
  52. Adds an iOS bundle file from the given [code]path[/code] to the exported project.
  53. </description>
  54. </method>
  55. <method name="add_ios_cpp_code">
  56. <return type="void" />
  57. <argument index="0" name="code" type="String" />
  58. <description>
  59. Adds a C++ code to the iOS export. The final code is created from the code appended by each active export plugin.
  60. </description>
  61. </method>
  62. <method name="add_ios_embedded_framework">
  63. <return type="void" />
  64. <argument index="0" name="path" type="String" />
  65. <description>
  66. Adds a dynamic library (*.dylib, *.framework) to Linking Phase in iOS's Xcode project and embeds it into resulting binary.
  67. [b]Note:[/b] For static libraries (*.a) works in same way as [method add_ios_framework].
  68. This method should not be used for System libraries as they are already present on the device.
  69. </description>
  70. </method>
  71. <method name="add_ios_framework">
  72. <return type="void" />
  73. <argument index="0" name="path" type="String" />
  74. <description>
  75. Adds a static library (*.a) or dynamic library (*.dylib, *.framework) to Linking Phase in iOS's Xcode project.
  76. </description>
  77. </method>
  78. <method name="add_ios_linker_flags">
  79. <return type="void" />
  80. <argument index="0" name="flags" type="String" />
  81. <description>
  82. Adds linker flags for the iOS export.
  83. </description>
  84. </method>
  85. <method name="add_ios_plist_content">
  86. <return type="void" />
  87. <argument index="0" name="plist_content" type="String" />
  88. <description>
  89. Adds content for iOS Property List files.
  90. </description>
  91. </method>
  92. <method name="add_ios_project_static_lib">
  93. <return type="void" />
  94. <argument index="0" name="path" type="String" />
  95. <description>
  96. Adds a static lib from the given [code]path[/code] to the iOS project.
  97. </description>
  98. </method>
  99. <method name="add_osx_plugin_file">
  100. <return type="void" />
  101. <argument index="0" name="path" type="String" />
  102. <description>
  103. Adds file or directory matching [code]path[/code] to [code]PlugIns[/code] directory of macOS app bundle.
  104. [b]Note:[/b] This is useful only for macOS exports.
  105. </description>
  106. </method>
  107. <method name="add_shared_object">
  108. <return type="void" />
  109. <argument index="0" name="path" type="String" />
  110. <argument index="1" name="tags" type="PoolStringArray" />
  111. <description>
  112. Adds a shared object or a directory containing only shared objects with the given [code]tags[/code] and destination [code]path[/code].
  113. [b]Note:[/b] In case of macOS exports, those shared objects will be added to [code]Frameworks[/code] directory of app bundle.
  114. In case of a directory code-sign will error if you place non code object in directory.
  115. </description>
  116. </method>
  117. <method name="skip">
  118. <return type="void" />
  119. <description>
  120. To be called inside [method _export_file]. Skips the current file, so it's not included in the export.
  121. </description>
  122. </method>
  123. </methods>
  124. <constants>
  125. </constants>
  126. </class>