Skip to content

EditorExportPreset

Inherits: RefCounted < Object

Export preset configuration.

Represents the configuration of an export preset, as created by the editor’s export dialog. An EditorExportPreset instance is intended to be used a read-only configuration passed to the EditorExportPlatform methods when exporting the project.

Returns Method
bool are_advanced_options_enabled() const
String get_custom_features() const
Dictionary get_customized_files() const
int get_customized_files_count() const
bool get_encrypt_directory() const
bool get_encrypt_pck() const
String get_encryption_ex_filter() const
String get_encryption_in_filter() const
String get_encryption_key() const
String get_exclude_filter() const
ExportFilter get_export_filter() const
String get_export_path() const
FileExportMode get_file_export_mode(path: String, default: FileExportMode = 0) const
PackedStringArray get_files_to_export() const
String get_include_filter() const
Variant get_or_env(name: StringName, env_var: String) const
PackedStringArray get_patches() const
String get_preset_name() const
Variant get_project_setting(name: StringName)
String get_version(name: StringName, windows_version: bool) const
bool has(property: StringName) const
bool has_export_file(path: String)
bool is_dedicated_server() const
bool is_runnable() const
PackedByteArray resolve_encryption_key()

ExportFilter

enum ExportFilter

EXPORT_ALL_RESOURCES = 0

EXPORT_SELECTED_SCENES = 1

EXPORT_SELECTED_RESOURCES = 2

EXCLUDE_SELECTED_RESOURCES = 3

EXPORT_CUSTOMIZED = 4

FileExportMode

enum FileExportMode

MODE_FILE_NOT_CUSTOMIZED = 0

MODE_FILE_STRIP = 1

MODE_FILE_KEEP = 2

MODE_FILE_REMOVE = 3

are_advanced_options_enabled

bool are_advanced_options_enabled() const

Returns true if the “Advanced” toggle is enabled in the export dialog.

get_custom_features

String get_custom_features() const

Returns a comma-separated list of custom features added to this preset, as a string. See Feature tags in the documentation for more information.

get_customized_files

Dictionary get_customized_files() const

Returns a dictionary of files selected in the “Resources” tab of the export dialog. The dictionary’s keys are file paths, and its values are the corresponding export modes: "strip", "keep", or "remove". See also get_file_export_mode().

get_customized_files_count

int get_customized_files_count() const

Returns the number of files selected in the “Resources” tab of the export dialog.

get_encrypt_directory

bool get_encrypt_directory() const

Returns true if PCK directory encryption is enabled in the export dialog.

get_encrypt_pck

bool get_encrypt_pck() const

Returns true if PCK encryption is enabled in the export dialog.

get_encryption_ex_filter

String get_encryption_ex_filter() const

Returns file filters to exclude during PCK encryption.

get_encryption_in_filter

String get_encryption_in_filter() const

Returns file filters to include during PCK encryption.

get_encryption_key

String get_encryption_key() const

Returns PCK encryption key. This will only return the value set in the export preset and not the value of the ORBLIT_SCRIPT_ENCRYPTION_KEY environment variable. See also resolve_encryption_key().

get_exclude_filter

String get_exclude_filter() const

Returns file filters to exclude during export.

get_export_filter

ExportFilter get_export_filter() const

Returns export file filter mode selected in the “Resources” tab of the export dialog.

get_export_path

String get_export_path() const

Returns export target path.

get_file_export_mode

FileExportMode get_file_export_mode(path: String, default: FileExportMode = 0) const

Returns file export mode for the specified file.

get_files_to_export

PackedStringArray get_files_to_export() const

Returns array of files to export.

get_include_filter

String get_include_filter() const

Returns file filters to include during export.

get_or_env

Variant get_or_env(name: StringName, env_var: String) const

Returns export option value or value of environment variable if it is set.

get_patches

PackedStringArray get_patches() const

Returns the list of packs on which to base a patch export on.

get_preset_name

String get_preset_name() const

Returns this export preset’s name.

get_project_setting

Variant get_project_setting(name: StringName)

Returns the value of the setting identified by name using export preset feature tag overrides instead of current OS features.

get_version

String get_version(name: StringName, windows_version: bool) const

Returns the preset’s version number, or fall back to the ProjectSettings.application/config/version project setting if set to an empty string.

If windows_version is true, formats the returned version number to be compatible with Windows executable metadata.

has

bool has(property: StringName) const

Returns true if the preset has the property named property.

has_export_file

bool has_export_file(path: String)

Returns true if the file at the specified path will be exported.

is_dedicated_server

bool is_dedicated_server() const

Returns true if the dedicated server export mode is selected in the export dialog.

is_runnable

bool is_runnable() const

Returns true if the “Runnable” toggle is enabled in the export dialog.

resolve_encryption_key

PackedByteArray resolve_encryption_key()

Returns PCK encryption key as a PackedByteArray. If the ORBLIT_SCRIPT_ENCRYPTION_KEY environment variable is set, this will return that key instead of the key set in the export preset. See also get_encryption_key().