EditorExportPlatform
Identifies a supported export platform, and internally provides the functionality of exporting to that platform.
Identifies a supported export platform, and internally provides the functionality of exporting to that platform.
Base resource that provides the functionality of exporting a release build of a project to a platform, from the editor. Stores platform-specific metadata such as the name and supported features of the platform, and performs the exporting of projects, PCK files, and ZIP files. Uses an export template for the platform provided at the time of project exporting.
Used in scripting by EditorExportPlugin to configure platform-specific customization of scenes and resources. See EditorExportPlugin._BeginCustomizeScenes and EditorExportPlugin._BeginCustomizeResources for more details.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Methods34
AddMessagevoid
public void AddMessage(EditorExportPlatform.ExportMessageType type, string category, string message);Adds a message to the export log that will be displayed when exporting ends.
| Name | Type | Default |
|---|---|---|
type | EditorExportPlatform.ExportMessageType | — |
category | string | — |
message | string | — |
ClearMessagesvoid
public void ClearMessages();Clears the export log.
CreatePresetEditorExportPreset
public EditorExportPreset CreatePreset();Create a new preset for this platform.
EditorExportPresetExportPackError
public Error ExportPack(EditorExportPreset preset, bool debug, string path, EditorExportPlatform.DebugFlags flags = (EditorExportPlatform.DebugFlags)0);Creates a PCK archive at path for the specified preset.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
path | string | — |
flags | EditorExportPlatform.DebugFlags | (EditorExportPlatform.DebugFlags)0 |
ErrorExportPackPatch2 overloads
public Error ExportPackPatch(EditorExportPreset preset, bool debug, string path, ReadOnlySpan<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.
Note: patches is an optional override of the set of patches defined in the export preset. When empty the patches defined in the export preset will be used instead.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
path | string | — |
patches | ReadOnlySpan<string> | — |
flags | EditorExportPlatform.DebugFlags | — |
Errorpublic Error ExportPackPatch(EditorExportPreset preset, bool debug, string path, string[] patches = null, EditorExportPlatform.DebugFlags flags = (EditorExportPlatform.DebugFlags)0);Creates a patch PCK archive at path for the specified preset, containing only the files that have changed since the last patch.
Note: patches is an optional override of the set of patches defined in the export preset. When empty the patches defined in the export preset will be used instead.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
path | string | — |
patches | string[] | null |
flags | EditorExportPlatform.DebugFlags | (EditorExportPlatform.DebugFlags)0 |
patchesIf the parameter is null, then the default value is Array.Empty<string>().
ErrorExportProject2 overloads
public Error ExportProject(EditorExportPreset preset, bool debug, string path, EditorExportPlatform.DebugFlags flags);Creates a full project at path for the specified preset. If notify is true, plugins using EditorExportPlugin._ExportBegin will be called during the process.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
path | string | — |
flags | EditorExportPlatform.DebugFlags | — |
Errorpublic Error ExportProject(EditorExportPreset preset, bool debug, string path, EditorExportPlatform.DebugFlags flags = (EditorExportPlatform.DebugFlags)0, bool notify = true);Creates a full project at path for the specified preset. If notify is true, plugins using EditorExportPlugin._ExportBegin will be called during the process.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
path | string | — |
flags | EditorExportPlatform.DebugFlags | (EditorExportPlatform.DebugFlags)0 |
notify | bool | true |
ErrorExportProjectFilesError
public Error ExportProjectFiles(EditorExportPreset preset, bool debug, Callable saveCb, Callable sharedCb = default);Exports project files for the specified preset. This method can be used to implement custom export format, other than PCK and ZIP. One of the callbacks is called for each exported file.
save_cb is called for all exported files and have the following arguments: info: Dictionary, file_data: PackedByteArray. The info dictionary contains the following values: path: String, source_path: String, file_index: int, file_count: int.
shared_cb is called for exported native shared/static libraries and have the following arguments: file_path: String, tags: PackedStringArray, target_folder: String.
Note: file_index and file_count are intended for progress tracking only and aren't necessarily unique and precise.
Note: The signature of save_cb changed in Reckfell. There is compatibility code to automatically handle the previous signature if the passed callable has 7 arguments.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
saveCb | Callable | — |
sharedCb | Callable | default |
ErrorExportZipError
public Error ExportZip(EditorExportPreset preset, bool debug, string path, EditorExportPlatform.DebugFlags flags = (EditorExportPlatform.DebugFlags)0);Create a ZIP archive at path for the specified preset.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
path | string | — |
flags | EditorExportPlatform.DebugFlags | (EditorExportPlatform.DebugFlags)0 |
ErrorExportZipPatch2 overloads
public Error ExportZipPatch(EditorExportPreset preset, bool debug, string path, ReadOnlySpan<string> patches, EditorExportPlatform.DebugFlags flags);Create a patch ZIP archive at path for the specified preset, containing only the files that have changed since the last patch.
Note: patches is an optional override of the set of patches defined in the export preset. When empty the patches defined in the export preset will be used instead.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
path | string | — |
patches | ReadOnlySpan<string> | — |
flags | EditorExportPlatform.DebugFlags | — |
Errorpublic Error ExportZipPatch(EditorExportPreset preset, bool debug, string path, string[] patches = null, EditorExportPlatform.DebugFlags flags = (EditorExportPlatform.DebugFlags)0);Create a patch ZIP archive at path for the specified preset, containing only the files that have changed since the last patch.
Note: patches is an optional override of the set of patches defined in the export preset. When empty the patches defined in the export preset will be used instead.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
path | string | — |
patches | string[] | null |
flags | EditorExportPlatform.DebugFlags | (EditorExportPlatform.DebugFlags)0 |
patchesIf the parameter is null, then the default value is Array.Empty<string>().
ErrorFindExportTemplateReckfell.Collections.Dictionary
public Reckfell.Collections.Dictionary FindExportTemplate(string templateFileName);Locates export template for the platform, and returns Reckfell.Collections.Dictionary with the following keys: path: String and error: String. This method is provided for convenience and custom export platforms aren't required to use it or keep export templates stored in the same way official templates are.
| Name | Type | Default |
|---|---|---|
templateFileName | string | — |
Reckfell.Collections.DictionaryGenExportFlagsstring[]
public string[] GenExportFlags(EditorExportPlatform.DebugFlags flags);Generates array of command line arguments for the default export templates for the debug flags and editor settings.
| Name | Type | Default |
|---|---|---|
flags | EditorExportPlatform.DebugFlags | — |
string[]GetCurrentPresetsReckfell.Collections.Array
public Reckfell.Collections.Array GetCurrentPresets();Returns array of EditorExportPresets for this platform.
Reckfell.Collections.ArrayGetForcedExportFiles2 overloads
public static string[] GetForcedExportFiles();Returns array of core file names that always should be exported regardless of preset config.
string[]public static string[] GetForcedExportFiles(EditorExportPreset preset = null);Returns array of core file names that always should be exported regardless of preset config.
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | null |
string[]GetInternalExportFilesReckfell.Collections.Dictionary
public Reckfell.Collections.Dictionary GetInternalExportFiles(EditorExportPreset preset, bool debug);Returns additional files that should always be exported regardless of preset configuration, and are not part of the project source. The returned Reckfell.Collections.Dictionary contains filename keys (string) and their corresponding raw data (byte[]).
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
Reckfell.Collections.DictionaryGetMessageCategorystring
public string GetMessageCategory(int index);Returns the message category for the message with the given index.
| Name | Type | Default |
|---|---|---|
index | int | — |
stringGetMessageCountint
public int GetMessageCount();Returns the number of messages in the export log.
intGetMessageTextstring
public string GetMessageText(int index);Returns the text for the message with the given index.
| Name | Type | Default |
|---|---|---|
index | int | — |
stringGetMessageTypeEditorExportPlatform.ExportMessageType
public EditorExportPlatform.ExportMessageType GetMessageType(int index);Returns the type for the message with the given index.
| Name | Type | Default |
|---|---|---|
index | int | — |
EditorExportPlatform.ExportMessageTypeGetOsNamestring
public string GetOsName();Returns the name of the export operating system handled by this EditorExportPlatform class, as a friendly string. Possible return values are Windows, Linux, macOS, Android, iOS, and Web.
stringGetWorstMessageTypeEditorExportPlatform.ExportMessageType
public EditorExportPlatform.ExportMessageType GetWorstMessageType();Returns most severe message type currently present in the export log.
EditorExportPlatform.ExportMessageTypeSavePackReckfell.Collections.Dictionary
public Reckfell.Collections.Dictionary SavePack(EditorExportPreset preset, bool debug, string path, bool embed = false);Saves PCK archive and returns Reckfell.Collections.Dictionary with the following keys: result: Error, so_files: Array (array of the shared/static objects which contains dictionaries with the following keys: path: String, tags: PackedStringArray, and target_folder: String).
If embed is true, PCK content is appended to the end of path file and return Reckfell.Collections.Dictionary additionally include following keys: embedded_start: int (embedded PCK offset) and embedded_size: int (embedded PCK size).
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
path | string | — |
embed | bool | false |
Reckfell.Collections.DictionarySavePackPatchReckfell.Collections.Dictionary
public Reckfell.Collections.Dictionary SavePackPatch(EditorExportPreset preset, bool debug, string path);Saves patch PCK archive and returns Reckfell.Collections.Dictionary with the following keys: result: Error, so_files: Array (array of the shared/static objects which contains dictionaries with the following keys: path: String, tags: PackedStringArray, and target_folder: String).
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
path | string | — |
Reckfell.Collections.DictionarySaveZipReckfell.Collections.Dictionary
public Reckfell.Collections.Dictionary SaveZip(EditorExportPreset preset, bool debug, string path);Saves ZIP archive and returns Reckfell.Collections.Dictionary with the following keys: result: Error, so_files: Array (array of the shared/static objects which contains dictionaries with the following keys: path: String, tags: PackedStringArray, and target_folder: String).
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
path | string | — |
Reckfell.Collections.DictionarySaveZipPatchReckfell.Collections.Dictionary
public Reckfell.Collections.Dictionary SaveZipPatch(EditorExportPreset preset, bool debug, string path);Saves patch ZIP archive and returns Reckfell.Collections.Dictionary with the following keys: result: Error, so_files: Array (array of the shared/static objects which contains dictionaries with the following keys: path: String, tags: PackedStringArray, and target_folder: String).
| Name | Type | Default |
|---|---|---|
preset | EditorExportPreset | — |
debug | bool | — |
path | string | — |
Reckfell.Collections.DictionarySshPushToRemote2 overloads
public Error SshPushToRemote(string host, string port, ReadOnlySpan<string> scpArgs, string srcFile, string dstFile);Uploads specified file over SCP protocol to the remote host.
| Name | Type | Default |
|---|---|---|
host | string | — |
port | string | — |
scpArgs | ReadOnlySpan<string> | — |
srcFile | string | — |
dstFile | string | — |
Errorpublic Error SshPushToRemote(string host, string port, string[] scpArgs, string srcFile, string dstFile);Uploads specified file over SCP protocol to the remote host.
| Name | Type | Default |
|---|---|---|
host | string | — |
port | string | — |
scpArgs | string[] | — |
srcFile | string | — |
dstFile | string | — |
ErrorSshRunOnRemote2 overloads
public Error SshRunOnRemote(string host, string port, ReadOnlySpan<string> sshArg, string cmdArgs, Reckfell.Collections.Array output, int portFwd);Executes specified command on the remote host via SSH protocol and returns command output in the output.
| Name | Type | Default |
|---|---|---|
host | string | — |
port | string | — |
sshArg | ReadOnlySpan<string> | — |
cmdArgs | string | — |
output | Reckfell.Collections.Array | — |
portFwd | int | — |
Errorpublic Error SshRunOnRemote(string host, string port, string[] sshArg, string cmdArgs, Reckfell.Collections.Array output = null, int portFwd = -1);Executes specified command on the remote host via SSH protocol and returns command output in the output.
| Name | Type | Default |
|---|---|---|
host | string | — |
port | string | — |
sshArg | string[] | — |
cmdArgs | string | — |
output | Reckfell.Collections.Array | null |
portFwd | int | -1 |
ErrorSshRunOnRemoteNoWait2 overloads
public long SshRunOnRemoteNoWait(string host, string port, ReadOnlySpan<string> sshArgs, string cmdArgs, int portFwd);Executes specified command on the remote host via SSH protocol and returns process ID (on the remote host) without waiting for command to finish.
| Name | Type | Default |
|---|---|---|
host | string | — |
port | string | — |
sshArgs | ReadOnlySpan<string> | — |
cmdArgs | string | — |
portFwd | int | — |
longpublic long SshRunOnRemoteNoWait(string host, string port, string[] sshArgs, string cmdArgs, int portFwd = -1);Executes specified command on the remote host via SSH protocol and returns process ID (on the remote host) without waiting for command to finish.
| Name | Type | Default |
|---|---|---|
host | string | — |
port | string | — |
sshArgs | string[] | — |
cmdArgs | string | — |
portFwd | int | -1 |
longEditorExportPlatform.DebugFlags
| Value | Description |
|---|---|
DumbClient = 1 | Flag is set if the remotely debugged project is expected to use the remote file system. If set, |
RemoteDebug = 2 | Flag is set if remote debug is enabled. If set, |
RemoteDebugLocalhost = 4 | Flag is set if remotely debugged project is running on the localhost. If set, |
ViewCollisions = 8 | Flag is set if the "Visible Collision Shapes" remote debug option is enabled. If set, |
ViewNavigation = 16 | Flag is set if the "Visible Navigation" remote debug option is enabled. If set, |
EditorExportPlatform.ExportMessageType
| Value | Description |
|---|---|
Error = 3 | Message type for error messages that must be addressed and fail the export. |
Info = 1 | Message type for informational messages that have no effect on the export. |
None = 0 | Invalid message type used as the default value when no type is specified. |
Warning = 2 | Message type for warning messages that should be addressed but still allow to complete the export. |