EditorExportPlatformExtension
Base class for custom EditorExportPlatform implementations (plugins).
Base class for custom EditorExportPlatform implementations (plugins).
External EditorExportPlatform implementations should inherit from this class.
To use EditorExportPlatform, register it using the EditorPlugin.AddExportPlatform method first.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
EditorExportPlatformExtensionConstructor
public EditorExportPlatformExtension();Methods35
GetConfigErrorstring
public string GetConfigError();Returns current configuration error message text. This method should be called only from the EditorExportPlatformExtension._CanExport, EditorExportPlatformExtension._HasValidExportConfiguration, or EditorExportPlatformExtension._HasValidProjectConfiguration implementations.
stringGetConfigMissingTemplatesbool
public bool GetConfigMissingTemplates();Returns true is export templates are missing from the current configuration. This method should be called only from the EditorExportPlatformExtension._CanExport, EditorExportPlatformExtension._HasValidExportConfiguration, or EditorExportPlatformExtension._HasValidProjectConfiguration implementations.
boolSetConfigErrorvoid
public void SetConfigError(string errorText);Sets current configuration error message text. This method should be called only from the EditorExportPlatformExtension._CanExport, EditorExportPlatformExtension._HasValidExportConfiguration, or EditorExportPlatformExtension._HasValidProjectConfiguration implementations.
| Name | Type | Default |
|---|---|---|
errorText | string | — |
SetConfigMissingTemplatesvoid
public void SetConfigMissingTemplates(bool missingTemplates);Set to true is export templates are missing from the current configuration. This method should be called only from the EditorExportPlatformExtension._CanExport, EditorExportPlatformExtension._HasValidExportConfiguration, or EditorExportPlatformExtension._HasValidProjectConfiguration implementations.
| Name | Type | Default |
|---|---|---|
missingTemplates | bool | — |
_CanExportbool
public virtual bool _CanExport(EditorExportPreset preset, bool debug);Returns true if the specified preset is valid and can be exported. Use EditorExportPlatformExtension.SetConfigError and EditorExportPlatformExtension.SetConfigMissingTemplates to set error details.
Usual implementations call EditorExportPlatformExtension._HasValidExportConfiguration and EditorExportPlatformExtension._HasValidProjectConfiguration to determine if exporting is possible.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
bool_Cleanupvoid
public virtual void _Cleanup();Called by the editor before platform is unregistered.
_ExportPackError
public virtual Error _ExportPack(EditorExportPreset preset, bool debug, string path, EditorExportPlatform.DebugFlags flags);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.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
path | string | — |
flags | EditorExportPlatform.DebugFlags | — |
Error_ExportPackPatchError
public virtual Error _ExportPackPatch(EditorExportPreset preset, bool debug, string path, string[] patches, EditorExportPlatform.DebugFlags flags);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.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
path | string | — |
patches | string[] | — |
flags | EditorExportPlatform.DebugFlags | — |
Error_ExportProjectError
public virtual Error _ExportProject(EditorExportPreset preset, bool debug, string path, EditorExportPlatform.DebugFlags flags);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.SavePack or EditorExportPlatform.SaveZip to use default PCK/ZIP export process, or calls EditorExportPlatform.ExportProjectFiles and implement custom callback for processing each exported file.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
path | string | — |
flags | EditorExportPlatform.DebugFlags | — |
Error_ExportZipError
public virtual Error _ExportZip(EditorExportPreset preset, bool debug, string path, EditorExportPlatform.DebugFlags flags);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.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
path | string | — |
flags | EditorExportPlatform.DebugFlags | — |
Error_ExportZipPatchError
public virtual Error _ExportZipPatch(EditorExportPreset preset, bool debug, string path, string[] patches, EditorExportPlatform.DebugFlags flags);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.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
path | string | — |
patches | string[] | — |
flags | EditorExportPlatform.DebugFlags | — |
Error_GetBinaryExtensionsstring[]
public virtual string[] _GetBinaryExtensions(EditorExportPreset preset);Returns array of supported binary extensions for the full project export.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
string[]_GetDebugProtocolstring
public virtual string _GetDebugProtocol();Returns protocol used for remote debugging. Default implementation return tcp://.
string_GetDeviceArchitecturestring
public virtual string _GetDeviceArchitecture(int device);Returns device architecture for remote deploy.
| Name | Type | Default |
|---|---|---|
device | int | — |
string_GetExportOptionVisibilitybool
public virtual bool _GetExportOptionVisibility(EditorExportPreset preset, string option);Validates option and returns visibility for the specified preset. Default implementation return true for all options.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
option | string | — |
bool_GetExportOptionWarningstring
public virtual string _GetExportOptionWarning(EditorExportPreset preset, StringName option);Validates option and returns warning message for the specified preset. Default implementation return empty string for all options.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
option | StringName | — |
string_GetExportOptionsReckfell.Collections.Array<Reckfell.Collections.Dictionary>
public virtual Reckfell.Collections.Array<Reckfell.Collections.Dictionary> _GetExportOptions();Returns a property list, as an Reckfell.Collections.Array of dictionaries. Each Reckfell.Collections.Dictionary must at least contain the name: StringName and type: Variant.Type entries.
Additionally, the following keys are supported:
hint: PropertyHinthint_string: Stringusage: PropertyUsageFlagsclass_name: StringNamedefault_value: Variant, default value of the property.update_visibility: bool, if set totrue,EditorExportPlatformExtension._GetExportOptionVisibilityis 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 theEditorExportPlatformExtension._HasValidExportConfigurationimplementation, and not used by the engine directly. See alsoReckfellObject.GetPropertyList.
Reckfell.Collections.Array<Reckfell.Collections.Dictionary>_GetLogoTexture2D
public virtual Texture2D _GetLogo();Returns the platform logo displayed in the export dialog. The logo should be 32×32 pixels, adjusted for the current editor scale (see EditorInterface.GetEditorScale).
Texture2D_GetNamestring
public virtual string _GetName();Returns export platform name.
string_GetOptionIconTexture2D
public virtual Texture2D _GetOptionIcon(int device);Returns the item icon for the specified device in the remote deploy menu. The icon should be 16×16 pixels, adjusted for the current editor scale (see EditorInterface.GetEditorScale).
| Name | Type | Default |
|---|---|---|
device | int | — |
Texture2D_GetOptionLabelstring
public virtual string _GetOptionLabel(int device);Returns remote deploy menu item label for the specified device.
| Name | Type | Default |
|---|---|---|
device | int | — |
string_GetOptionTooltipstring
public virtual string _GetOptionTooltip(int device);Returns remote deploy menu item tooltip for the specified device.
| Name | Type | Default |
|---|---|---|
device | int | — |
string_GetOptionsCountint
public virtual int _GetOptionsCount();Returns the number of devices (or other options) available in the remote deploy menu.
int_GetOptionsTooltipstring
public virtual string _GetOptionsTooltip();Returns tooltip of the remote deploy menu button.
string_GetOsNamestring
public virtual string _GetOsName();Returns target OS name.
string_GetPlatformFeaturesstring[]
public virtual string[] _GetPlatformFeatures();Returns array of platform specific features.
string[]_GetPresetFeaturesstring[]
public virtual string[] _GetPresetFeatures(EditorExportPreset preset);Returns array of platform specific features for the specified preset.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
string[]_GetRunIconTexture2D
public virtual Texture2D _GetRunIcon();Returns the icon of the remote deploy menu button. The icon should be 16×16 pixels, adjusted for the current editor scale (see EditorInterface.GetEditorScale).
Texture2D_HasValidExportConfigurationbool
public virtual bool _HasValidExportConfiguration(EditorExportPreset preset, bool debug);Returns true if export configuration is valid.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
bool_HasValidProjectConfigurationbool
public virtual bool _HasValidProjectConfiguration(EditorExportPreset preset);Returns true if project configuration is valid.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
bool_Initializevoid
public virtual void _Initialize();Initializes the plugin. Called by the editor when platform is registered.
_IsExecutablebool
public virtual bool _IsExecutable(string path);Returns true if specified file is a valid executable (native executable or script) for the target platform.
| Name | Type | Default |
|---|---|---|
path | string | — |
bool_PollExportbool
public virtual bool _PollExport();Returns true if remote deploy options are changed and editor interface should be updated.
bool_RunError
public virtual Error _Run(EditorExportPreset preset, int device, EditorExportPlatform.DebugFlags debugFlags);This method is called when device remote 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.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
device | int | — |
debugFlags | EditorExportPlatform.DebugFlags | — |
Error_ShouldUpdateExportOptionsbool
public virtual bool _ShouldUpdateExportOptions();Returns true if export options list is changed and presets should be updated.
bool