Class EditorExportPlatformExtension
Base class for custom EditorExportPlatform implementations (plugins).
- Inheritance
-
EditorExportPlatformExtension
Remarks
External EditorExportPlatform implementations should inherit from this class.
To use EditorExportPlatform, register it using the EditorPlugin.add_export_platform method first.
Methods
_can_export(EditorExportPreset, bool)
Qualifiers: virtualconst
Optional.
Returns true
, if specified preset
is valid and can be exported. Use EditorExportPlatformExtension.set_config_error and EditorExportPlatformExtension.set_config_missing_templates to set error details.
Usual implementation can call EditorExportPlatformExtension._has_valid_export_configuration and EditorExportPlatformExtension._has_valid_project_configuration to determine if export is possible.
bool _can_export(EditorExportPreset preset, bool debug)
Parameters
preset
EditorExportPresetdebug
bool
_cleanup
Qualifiers: virtual
Optional.
Called by the editor before platform is unregistered.
void _cleanup
_export_pack(EditorExportPreset, bool, String, int)
Qualifiers: 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.
int _export_pack(EditorExportPreset preset, bool debug, String path, int flags)
Parameters
preset
EditorExportPresetdebug
boolpath
Stringflags
int
_export_pack_patch(EditorExportPreset, bool, String, PackedStringArray, int)
Qualifiers: 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.
int _export_pack_patch(EditorExportPreset preset, bool debug, String path, PackedStringArray patches, int flags)
Parameters
preset
EditorExportPresetdebug
boolpath
Stringpatches
PackedStringArrayflags
int
_export_project(EditorExportPreset, bool, String, int)
Qualifiers: 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.
int _export_project(EditorExportPreset preset, bool debug, String path, int flags)
Parameters
preset
EditorExportPresetdebug
boolpath
Stringflags
int
_export_zip(EditorExportPreset, bool, String, int)
Qualifiers: 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.
int _export_zip(EditorExportPreset preset, bool debug, String path, int flags)
Parameters
preset
EditorExportPresetdebug
boolpath
Stringflags
int
_export_zip_patch(EditorExportPreset, bool, String, PackedStringArray, int)
Qualifiers: 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.
int _export_zip_patch(EditorExportPreset preset, bool debug, String path, PackedStringArray patches, int flags)
Parameters
preset
EditorExportPresetdebug
boolpath
Stringpatches
PackedStringArrayflags
int
_get_binary_extensions(EditorExportPreset)
Qualifiers: virtualconst
Required.
Returns array of supported binary extensions for the full project export.
PackedStringArray _get_binary_extensions(EditorExportPreset preset)
Parameters
preset
EditorExportPreset
_get_debug_protocol
Qualifiers: virtualconst
Optional.
Returns protocol used for remote debugging. Default implementation return tcp://
.
String _get_debug_protocol
_get_device_architecture(int)
Qualifiers: virtualconst
Optional.
Returns device architecture for one-click deploy.
String _get_device_architecture(int device)
Parameters
device
int
_get_export_option_visibility(EditorExportPreset, String)
Qualifiers: virtualconst
Optional.
Validates option
and returns visibility for the specified preset
. Default implementation return true
for all options.
bool _get_export_option_visibility(EditorExportPreset preset, String option)
Parameters
preset
EditorExportPresetoption
String
_get_export_option_warning(EditorExportPreset, StringName)
Qualifiers: virtualconst
Optional.
Validates option
and returns warning message for the specified preset
. Default implementation return empty string for all options.
String _get_export_option_warning(EditorExportPreset preset, StringName option)
Parameters
preset
EditorExportPresetoption
StringName
_get_export_options
Qualifiers: virtualconst
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 totrue
, EditorExportPlatformExtension._get_export_option_visibility is called for each property when this property is changed.required: bool
, if set totrue
, this property warnings are critical, and should be resolved to make export possible. This value is a hint for the EditorExportPlatformExtension._has_valid_export_configuration implementation, and not used by the engine directly.
See also _get_property_list.
Dictionary[] _get_export_options
_get_logo
Qualifiers: virtualconst
Required.
Returns platform logo displayed in the export dialog, logo should be 32x32 adjusted to the current editor scale, see get_editor_scale.
Texture2D _get_logo
_get_name
Qualifiers: virtualconst
Required.
Returns export platform name.
String _get_name
_get_option_icon(int)
Qualifiers: virtualconst
Optional.
Returns one-click deploy menu item icon for the specified device
, icon should be 16x16 adjusted to the current editor scale, see get_editor_scale.
ImageTexture _get_option_icon(int device)
Parameters
device
int
_get_option_label(int)
Qualifiers: virtualconst
Optional.
Returns one-click deploy menu item label for the specified device
.
String _get_option_label(int device)
Parameters
device
int
_get_option_tooltip(int)
Qualifiers: virtualconst
Optional.
Returns one-click deploy menu item tooltip for the specified device
.
String _get_option_tooltip(int device)
Parameters
device
int
_get_options_count
Qualifiers: virtualconst
Optional.
Returns number one-click deploy devices (or other one-click option displayed in the menu).
int _get_options_count
_get_options_tooltip
Qualifiers: virtualconst
Optional.
Returns tooltip of the one-click deploy menu button.
String _get_options_tooltip
_get_os_name
Qualifiers: virtualconst
Required.
Returns target OS name.
String _get_os_name
_get_platform_features
Qualifiers: virtualconst
Required.
Returns array of platform specific features.
PackedStringArray _get_platform_features
_get_preset_features(EditorExportPreset)
Qualifiers: virtualconst
Required.
Returns array of platform specific features for the specified preset
.
PackedStringArray _get_preset_features(EditorExportPreset preset)
Parameters
preset
EditorExportPreset
_get_run_icon
Qualifiers: virtualconst
Optional.
Returns icon of the one-click deploy menu button, icon should be 16x16 adjusted to the current editor scale, see get_editor_scale.
Texture2D _get_run_icon
_has_valid_export_configuration(EditorExportPreset, bool)
Qualifiers: virtualconst
Required.
Returns true
if export configuration is valid.
bool _has_valid_export_configuration(EditorExportPreset preset, bool debug)
Parameters
preset
EditorExportPresetdebug
bool
_has_valid_project_configuration(EditorExportPreset)
Qualifiers: virtualconst
Required.
Returns true
if project configuration is valid.
bool _has_valid_project_configuration(EditorExportPreset preset)
Parameters
preset
EditorExportPreset
_is_executable(String)
Qualifiers: virtualconst
Optional.
Returns true
if specified file is a valid executable (native executable or script) for the target platform.
bool _is_executable(String path)
Parameters
path
String
_poll_export
Qualifiers: virtual
Optional.
Returns true
if one-click deploy options are changed and editor interface should be updated.
bool _poll_export
_run(EditorExportPreset, int, int)
Qualifiers: 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.
int _run(EditorExportPreset preset, int device, int debug_flags)
Parameters
preset
EditorExportPresetdevice
intdebug_flags
int
_should_update_export_options
Qualifiers: virtual
Optional.
Returns true
if export options list is changed and presets should be updated.
bool _should_update_export_options
get_config_error
Qualifiers: const
Returns current configuration error message text. This method should be called only from the EditorExportPlatformExtension._can_export, EditorExportPlatformExtension._has_valid_export_configuration, or EditorExportPlatformExtension._has_valid_project_configuration implementations.
String get_config_error
get_config_missing_templates
Qualifiers: const
Returns true
is export templates are missing from the current configuration. This method should be called only from the EditorExportPlatformExtension._can_export, EditorExportPlatformExtension._has_valid_export_configuration, or EditorExportPlatformExtension._has_valid_project_configuration implementations.
bool get_config_missing_templates
set_config_error(String)
Qualifiers: const
Sets current configuration error message text. This method should be called only from the EditorExportPlatformExtension._can_export, EditorExportPlatformExtension._has_valid_export_configuration, or EditorExportPlatformExtension._has_valid_project_configuration implementations.
void set_config_error(String error_text)
Parameters
error_text
String
set_config_missing_templates(bool)
Qualifiers: const
Set to true
is export templates are missing from the current configuration. This method should be called only from the EditorExportPlatformExtension._can_export, EditorExportPlatformExtension._has_valid_export_configuration, or EditorExportPlatformExtension._has_valid_project_configuration implementations.
void set_config_missing_templates(bool missing_templates)
Parameters
missing_templates
bool