Up to date

This page is up to date for Blazium 0.4.90 (4.3). If you still find outdated information, please open an issue.

EditorExportPlatformExtension๏ƒ

Inherits: EditorExportPlatform < RefCounted < Object

Base class for custom EditorExportPlatform implementations (plugins).

Description๏ƒ

External EditorExportPlatform implementations should inherit from this class.

To use EditorExportPlatform, register it using the EditorPlugin.add_export_platform method first.

Methods๏ƒ

bool

_can_export(preset: EditorExportPreset, debug: bool) virtual const

void

_cleanup() virtual

Error

_export_pack(preset: EditorExportPreset, debug: bool, path: String, flags: BitField[DebugFlags]) virtual

Error

_export_pack_patch(preset: EditorExportPreset, debug: bool, path: String, patches: PackedStringArray, flags: BitField[DebugFlags]) virtual

Error

_export_project(preset: EditorExportPreset, debug: bool, path: String, flags: BitField[DebugFlags]) virtual

Error

_export_zip(preset: EditorExportPreset, debug: bool, path: String, flags: BitField[DebugFlags]) virtual

Error

_export_zip_patch(preset: EditorExportPreset, debug: bool, path: String, patches: PackedStringArray, flags: BitField[DebugFlags]) virtual

PackedStringArray

_get_binary_extensions(preset: EditorExportPreset) virtual const

String

_get_debug_protocol() virtual const

String

_get_device_architecture(device: int) virtual const

bool

_get_export_option_visibility(preset: EditorExportPreset, option: String) virtual const

String

_get_export_option_warning(preset: EditorExportPreset, option: StringName) virtual const

Array[Dictionary]

_get_export_options() virtual const

Texture2D

_get_logo() virtual const

String

_get_name() virtual const

ImageTexture

_get_option_icon(device: int) virtual const

String

_get_option_label(device: int) virtual const

String

_get_option_tooltip(device: int) virtual const

int

_get_options_count() virtual const

String

_get_options_tooltip() virtual const

String

_get_os_name() virtual const

PackedStringArray

_get_platform_features() virtual const

PackedStringArray

_get_preset_features(preset: EditorExportPreset) virtual const

Texture2D

_get_run_icon() virtual const

bool

_has_valid_export_configuration(preset: EditorExportPreset, debug: bool) virtual const

bool

_has_valid_project_configuration(preset: EditorExportPreset) virtual const

bool

_is_executable(path: String) virtual const

bool

_poll_export() virtual

Error

_run(preset: EditorExportPreset, device: int, debug_flags: BitField[DebugFlags]) virtual

bool

_should_update_export_options() virtual

String

get_config_error() const

bool

get_config_missing_templates() const

void

set_config_error(error_text: String) const

void

set_config_missing_templates(missing_templates: bool) const


Method Descriptions๏ƒ

bool _can_export(preset: EditorExportPreset, debug: bool) virtual const ๐Ÿ”—

Optional.

Returns true, if specified preset is valid and can be exported. Use set_config_error and set_config_missing_templates to set error details.

Usual implementation can call _has_valid_export_configuration and _has_valid_project_configuration to determine if export is possible.


void _cleanup() virtual ๐Ÿ”—

Optional.

Called by the editor before platform is unregistered.


Error _export_pack(preset: EditorExportPreset, debug: bool, path: String, flags: BitField[DebugFlags]) virtual ๐Ÿ”—

Optional.

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.


Error _export_pack_patch(preset: EditorExportPreset, debug: bool, path: String, patches: PackedStringArray, flags: BitField[DebugFlags]) virtual ๐Ÿ”—

Optional.

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.


Error _export_project(preset: EditorExportPreset, debug: bool, path: String, flags: BitField[DebugFlags]) virtual ๐Ÿ”—

Required.

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.


Error _export_zip(preset: EditorExportPreset, debug: bool, path: String, flags: BitField[DebugFlags]) virtual ๐Ÿ”—

Optional.

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.


Error _export_zip_patch(preset: EditorExportPreset, debug: bool, path: String, patches: PackedStringArray, flags: BitField[DebugFlags]) virtual ๐Ÿ”—

Optional.

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.


PackedStringArray _get_binary_extensions(preset: EditorExportPreset) virtual const ๐Ÿ”—

Required.

Returns array of supported binary extensions for the full project export.


String _get_debug_protocol() virtual const ๐Ÿ”—

Optional.

Returns protocol used for remote debugging. Default implementation return tcp://.


String _get_device_architecture(device: int) virtual const ๐Ÿ”—

Optional.

Returns device architecture for one-click deploy.


bool _get_export_option_visibility(preset: EditorExportPreset, option: String) virtual const ๐Ÿ”—

Optional.

Validates option and returns visibility for the specified preset. Default implementation return true for all options.


String _get_export_option_warning(preset: EditorExportPreset, option: StringName) virtual const ๐Ÿ”—

Optional.

Validates option and returns warning message for the specified preset. Default implementation return empty string for all options.


Array[Dictionary] _get_export_options() virtual const ๐Ÿ”—

Optional.

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.


Required.

Returns platform logo displayed in the export dialog, logo should be 32x32 adjusted to the current editor scale, see EditorInterface.get_editor_scale.


String _get_name() virtual const ๐Ÿ”—

Required.

Returns export platform name.


ImageTexture _get_option_icon(device: int) virtual const ๐Ÿ”—

Optional.

Returns one-click deploy menu item icon for the specified device, icon should be 16x16 adjusted to the current editor scale, see EditorInterface.get_editor_scale.


String _get_option_label(device: int) virtual const ๐Ÿ”—

Optional.

Returns one-click deploy menu item label for the specified device.


String _get_option_tooltip(device: int) virtual const ๐Ÿ”—

Optional.

Returns one-click deploy menu item tooltip for the specified device.


int _get_options_count() virtual const ๐Ÿ”—

Optional.

Returns number one-click deploy devices (or other one-click option displayed in the menu).


String _get_options_tooltip() virtual const ๐Ÿ”—

Optional.

Returns tooltip of the one-click deploy menu button.


String _get_os_name() virtual const ๐Ÿ”—

Required.

Returns target OS name.


PackedStringArray _get_platform_features() virtual const ๐Ÿ”—

Required.

Returns array of platform specific features.


PackedStringArray _get_preset_features(preset: EditorExportPreset) virtual const ๐Ÿ”—

Required.

Returns array of platform specific features for the specified preset.


Texture2D _get_run_icon() virtual const ๐Ÿ”—

Optional.

Returns icon of the one-click deploy menu button, icon should be 16x16 adjusted to the current editor scale, see EditorInterface.get_editor_scale.


bool _has_valid_export_configuration(preset: EditorExportPreset, debug: bool) virtual const ๐Ÿ”—

Required.

Returns true if export configuration is valid.


bool _has_valid_project_configuration(preset: EditorExportPreset) virtual const ๐Ÿ”—

Required.

Returns true if project configuration is valid.


bool _is_executable(path: String) virtual const ๐Ÿ”—

Optional.

Returns true if specified file is a valid executable (native executable or script) for the target platform.


bool _poll_export() virtual ๐Ÿ”—

Optional.

Returns true if one-click deploy options are changed and editor interface should be updated.


Error _run(preset: EditorExportPreset, device: int, debug_flags: BitField[DebugFlags]) virtual ๐Ÿ”—

Optional.

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.


bool _should_update_export_options() virtual ๐Ÿ”—

Optional.

Returns true if export options list is changed and presets should be updated.


String get_config_error() const ๐Ÿ”—

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.


bool get_config_missing_templates() const ๐Ÿ”—

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.


void set_config_error(error_text: String) const ๐Ÿ”—

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.


void set_config_missing_templates(missing_templates: bool) const ๐Ÿ”—

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.