Base class for custom EditorExportPlatform implementations (plugins).
External EditorExportPlatform implementations should inherit from this class.
To use EditorExportPlatform, register it using the EditorPlugin.add_export_platform() method first.
Returns true if the specified preset is valid and can be exported. Use set_config_error() and set_config_missing_templates() to set error details.
Usual implementations call _has_valid_export_configuration() and _has_valid_project_configuration() to determine if exporting is possible.
Creates a PCK archive at path for the specified preset.
This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" disabled, and PCK is selected as a file type.
Creates a patch PCK archive at path for the specified preset, containing only the files that have changed since the last patch.
This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" enabled, and PCK is selected as a file type.
Note: The patches provided in patches have already been loaded when this method is called and are merely provided as context. When empty the patches defined in the export preset have been loaded instead.
Creates a full project at path for the specified preset.
This method is called when "Export" button is pressed in the export dialog.
This method implementation can call EditorExportPlatform.save_pack() or EditorExportPlatform.save_zip() to use default PCK/ZIP export process, or calls EditorExportPlatform.export_project_files() and implement custom callback for processing each exported file.
Create a ZIP archive at path for the specified preset.
This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" disabled, and ZIP is selected as a file type.
Create a ZIP archive at path for the specified preset, containing only the files that have changed since the last patch.
This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" enabled, and ZIP is selected as a file type.
Note: The patches provided in patches have already been loaded when this method is called and are merely provided as context. When empty the patches defined in the export preset have been loaded instead.
Validates option and returns visibility for the specified preset. Default implementation return true for all options.
Validates option and returns warning message for the specified preset. Default implementation return empty string for all options.
Returns a property list, as an Array of dictionaries. Each Dictionary must at least contain the name: StringName and type: Variant.Type entries.
Additionally, the following keys are supported:
- hint: PropertyHint
- hint_string: String
- usage: PropertyUsageFlags
- class_name: StringName
- default_value: Variant, default value of the property.
- update_visibility: bool, if set to true, _get_export_option_visibility() is called for each property when this property is changed.
- required: bool, if set to true, this property warnings are critical, and should be resolved to make export possible. This value is a hint for the _has_valid_export_configuration() implementation, and not used by the engine directly.
See also Object._get_property_list().
Returns the platform logo displayed in the export dialog. The logo should be 32×32 pixels, adjusted for the current editor scale (see EditorInterface.get_editor_scale()).
Returns the item icon for the specified device in the one-click deploy menu. The icon should be 16×16 pixels, adjusted for the current editor scale (see EditorInterface.get_editor_scale()).
Returns the icon of the one-click deploy menu button. The icon should be 16×16 pixels, adjusted for the current editor scale (see EditorInterface.get_editor_scale()).
Returns true if specified file is a valid executable (native executable or script) for the target platform.
This method is called when device one-click deploy menu option is selected.
Implementation should export project to a temporary location, upload and run it on the specific device, or perform another action associated with the menu item.
Returns current configuration error message text. This method should be called only from the _can_export(), _has_valid_export_configuration(), or _has_valid_project_configuration() implementations.
Returns true is export templates are missing from the current configuration. This method should be called only from the _can_export(), _has_valid_export_configuration(), or _has_valid_project_configuration() implementations.
Sets current configuration error message text. This method should be called only from the _can_export(), _has_valid_export_configuration(), or _has_valid_project_configuration() implementations.
Set to true is export templates are missing from the current configuration. This method should be called only from the _can_export(), _has_valid_export_configuration(), or _has_valid_project_configuration() implementations.