EditorExportPlugin

Inherits: Reference < Object

Category: Core

Brief Description

Editor plugin to control the export process.

Member Functions

Variant custom_export ( String name, EditorExportPlatform platform ) virtual

Description

This plugin is added into EditorImportExport and allows to modify the behavior of the export process for individual files.

Member Function Description

  • Variant custom_export ( String name, EditorExportPlatform platform ) virtual

This function is called for each file exported and depending from the return value one of many things might happen.

  1. If returned value is null, the file is exported as is.
  2. If the returned value is a RawAray (array of bytes), the content of that array becomes the new file being exported.
  3. If the file must also change its name when exported, then a Dictionary must be returned with two fields: ‘name’ with the new filename and ‘data’ with a 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.