class_editorexportplugin.rst 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_EditorExportPlugin:
  4. EditorExportPlugin
  5. ==================
  6. **Inherits:** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. Editor plugin to control the export process.
  11. Member Functions
  12. ----------------
  13. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  14. | :ref:`Variant<class_variant>` | :ref:`custom_export<class_EditorExportPlugin_custom_export>` **(** :ref:`String<class_string>` name, EditorExportPlatform platform **)** virtual |
  15. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  16. Description
  17. -----------
  18. This plugin is added into EditorImportExport and allows to modify the behavior of the export process for individual files.
  19. Member Function Description
  20. ---------------------------
  21. .. _class_EditorExportPlugin_custom_export:
  22. - :ref:`Variant<class_variant>` **custom_export** **(** :ref:`String<class_string>` name, EditorExportPlatform platform **)** virtual
  23. This function is called for each file exported and depending from the return value one of many things might happen.
  24. 1) If returned value is null, the file is exported as is.
  25. 2) If the returned value is a RawAray (array of bytes), the content of that array becomes the new file being exported.
  26. 3) If the file must also change its name when exported, then a :ref:`Dictionary<class_dictionary>` must be returned with two fields: 'name' with the new filename and 'data' with a :ref:`RawArray<class_rawarray>` containing the raw contents of the file. Even if the name is changed, the run-time will redirect the old file to the new file automatically when accessed.