Index · Object → RefCounted → EditorExportPlatform → EditorExportPlatformExtension

EditorExportPlatformExtension

Base class for custom EditorExportPlatform implementations (plugins).

Class Description

External EditorExportPlatform implementations should inherit from this class.

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

Methods

func _can_export(preset: EditorExportPreset, debug: bool) -> bool

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.

func _cleanup() -> void

Called by the editor before platform is unregistered.

func _export_pack(preset: EditorExportPreset, debug: bool, path: String, flags: EditorExportPlatform.DebugFlags) -> Error

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.

func _export_pack_patch(preset: EditorExportPreset, debug: bool, path: String, patches: PackedStringArray, flags: EditorExportPlatform.DebugFlags) -> Error

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.

func _export_project(preset: EditorExportPreset, debug: bool, path: String, flags: EditorExportPlatform.DebugFlags) -> Error

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.

func _export_zip(preset: EditorExportPreset, debug: bool, path: String, flags: EditorExportPlatform.DebugFlags) -> Error

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.

func _export_zip_patch(preset: EditorExportPreset, debug: bool, path: String, patches: PackedStringArray, flags: EditorExportPlatform.DebugFlags) -> Error

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.

func _get_binary_extensions(preset: EditorExportPreset) -> PackedStringArray

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

func _get_debug_protocol() -> String

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

func _get_device_architecture(device: int) -> String

Returns device architecture for one-click deploy.

func _get_export_option_visibility(preset: EditorExportPreset, option: String) -> bool

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

func _get_export_option_warning(preset: EditorExportPreset, option: StringName) -> String

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

func _get_export_options() -> Dictionary[]

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().

func _get_name() -> String

Returns export platform name.

func _get_option_icon(device: int) -> Texture2D

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()).

func _get_option_label(device: int) -> String

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

func _get_option_tooltip(device: int) -> String

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

func _get_options_count() -> int

Returns the number of devices (or other options) available in the one-click deploy menu.

func _get_options_tooltip() -> String

Returns tooltip of the one-click deploy menu button.

func _get_os_name() -> String

Returns target OS name.

func _get_platform_features() -> PackedStringArray

Returns array of platform specific features.

func _get_preset_features(preset: EditorExportPreset) -> PackedStringArray

Returns array of platform specific features for the specified preset.

func _get_run_icon() -> Texture2D

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()).

func _has_valid_export_configuration(preset: EditorExportPreset, debug: bool) -> bool

Returns true if export configuration is valid.

func _has_valid_project_configuration(preset: EditorExportPreset) -> bool

Returns true if project configuration is valid.

func _initialize() -> void

Initializes the plugin. Called by the editor when platform is registered.

func _is_executable(path: String) -> bool

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

func _poll_export() -> bool

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

func _run(preset: EditorExportPreset, device: int, debug_flags: EditorExportPlatform.DebugFlags) -> Error

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.

func _should_update_export_options() -> bool

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

func get_config_error() -> String

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.

func get_config_missing_templates() -> bool

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.

func set_config_error(error_text: String) -> void

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.

func set_config_missing_templates(missing_templates: bool) -> void

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.

Inherited from EditorExportPlatform (27)
func add_message(type: EditorExportPlatform.ExportMessageType, category: String, message: String) -> void
func clear_messages() -> void
func export_pack(preset: EditorExportPreset, debug: bool, path: String, flags: EditorExportPlatform.DebugFlags = 0) -> Error
func export_pack_patch(preset: EditorExportPreset, debug: bool, path: String, patches: PackedStringArray = PackedStringArray(), flags: EditorExportPlatform.DebugFlags = 0) -> Error
func export_project(preset: EditorExportPreset, debug: bool, path: String, flags: EditorExportPlatform.DebugFlags = 0, notify: bool = true) -> Error
func export_project_files(preset: EditorExportPreset, debug: bool, save_cb: Callable, shared_cb: Callable = Callable()) -> Error
func export_zip(preset: EditorExportPreset, debug: bool, path: String, flags: EditorExportPlatform.DebugFlags = 0) -> Error
func export_zip_patch(preset: EditorExportPreset, debug: bool, path: String, patches: PackedStringArray = PackedStringArray(), flags: EditorExportPlatform.DebugFlags = 0) -> Error
func find_export_template(template_file_name: String) -> Dictionary
func get_message_text(index: int) -> String
func save_pack(preset: EditorExportPreset, debug: bool, path: String, embed: bool = false) -> Dictionary
func save_pack_patch(preset: EditorExportPreset, debug: bool, path: String) -> Dictionary
func save_zip(preset: EditorExportPreset, debug: bool, path: String) -> Dictionary
func save_zip_patch(preset: EditorExportPreset, debug: bool, path: String) -> Dictionary
func ssh_push_to_remote(host: String, port: String, scp_args: PackedStringArray, src_file: String, dst_file: String) -> Error
func ssh_run_on_remote(host: String, port: String, ssh_arg: PackedStringArray, cmd_args: String, output: Array = [], port_fwd: int = -1) -> Error
func ssh_run_on_remote_no_wait(host: String, port: String, ssh_args: PackedStringArray, cmd_args: String, port_fwd: int = -1) -> int
Inherited from RefCounted (4)
func init_ref() -> bool
func reference() -> bool
func unreference() -> bool
Inherited from Object (62)
func _get(property: StringName) -> Variant
func _get_property_list() -> Dictionary[]
func _init() -> void
func _iter_get(iter: Variant) -> Variant
func _iter_init(iter: Array) -> bool
func _iter_next(iter: Array) -> bool
func _notification(what: int) -> void
func _set(property: StringName, value: Variant) -> bool
func _to_string() -> String
func _validate_property(property: Dictionary) -> void
func add_user_signal(signal: String, arguments: Array = []) -> void
func call(method: StringName) -> Variant
func callv(method: StringName, arg_array: Array) -> Variant
func cancel_free() -> void
func connect(signal: StringName, callable: Callable, flags: int = 0) -> Error
func disconnect(signal: StringName, callable: Callable) -> void
func emit_signal(signal: StringName) -> Error
func free() -> void
func get(property: StringName) -> Variant
func get_class() -> String
func get_incoming_connections() -> Dictionary[]
func get_indexed(property_path: NodePath) -> Variant
func get_meta(name: StringName, default: Variant = null) -> Variant
func get_meta_list() -> StringName[]
func get_method_list() -> Dictionary[]
func get_property_list() -> Dictionary[]
func get_signal_connection_list(signal: StringName) -> Dictionary[]
func get_signal_list() -> Dictionary[]
func has_meta(name: StringName) -> bool
func has_method(method: StringName) -> bool
func has_signal(signal: StringName) -> bool
func is_class(class: StringName) -> bool
func is_connected(signal: StringName, callable: Callable) -> bool
func notification(what: int, reversed: bool = false) -> void
func remove_meta(name: StringName) -> void
func remove_user_signal(signal: StringName) -> void
func set(property: StringName, value: Variant) -> void
func set_block_signals(enable: bool) -> void
func set_deferred(property: StringName, value: Variant) -> void
func set_indexed(property_path: NodePath, value: Variant) -> void
func set_message_translation(enable: bool) -> void
func set_meta(name: StringName, value: Variant) -> void
func set_script(script: Variant) -> void
func set_translation_domain(domain: StringName) -> void
func to_string() -> String
func tr(message: StringName, context: StringName = &"") -> String
func tr_n(message: StringName, plural_message: StringName, n: int, context: StringName = &"") -> String

Signals

Inherited from Object (2)