Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
EditorExportPreset
继承: RefCounted < Object
导出预设配置。
描述
表示由编辑器的导出对话框创建的导出预设的配置。EditorExportPreset 实例旨在用作在导出项目时传递给 EditorExportPlatform 方法的只读配置。
方法
are_advanced_options_enabled() const |
|
get_custom_features() const |
|
get_customized_files() const |
|
get_customized_files_count() const |
|
get_encrypt_directory() const |
|
get_encrypt_pck() const |
|
get_encryption_ex_filter() const |
|
get_encryption_in_filter() const |
|
get_encryption_key() const |
|
get_exclude_filter() const |
|
get_export_filter() const |
|
get_export_path() const |
|
get_file_export_mode(path: String, default: FileExportMode = 0) const |
|
get_files_to_export() const |
|
get_include_filter() const |
|
get_or_env(name: StringName, env_var: String) const |
|
get_patches() const |
|
get_preset_name() const |
|
get_project_setting(name: StringName) |
|
get_script_export_mode() const |
|
get_version(name: StringName, windows_version: bool) const |
|
has(property: StringName) const |
|
has_export_file(path: String) |
|
is_dedicated_server() const |
|
is_runnable() const |
枚举
enum ExportFilter: 🔗
ExportFilter EXPORT_ALL_RESOURCES = 0
There is currently no description for this enum. Please help us by contributing one!
ExportFilter EXPORT_SELECTED_SCENES = 1
There is currently no description for this enum. Please help us by contributing one!
ExportFilter EXPORT_SELECTED_RESOURCES = 2
There is currently no description for this enum. Please help us by contributing one!
ExportFilter EXCLUDE_SELECTED_RESOURCES = 3
There is currently no description for this enum. Please help us by contributing one!
ExportFilter EXPORT_CUSTOMIZED = 4
There is currently no description for this enum. Please help us by contributing one!
enum FileExportMode: 🔗
FileExportMode MODE_FILE_NOT_CUSTOMIZED = 0
There is currently no description for this enum. Please help us by contributing one!
FileExportMode MODE_FILE_STRIP = 1
There is currently no description for this enum. Please help us by contributing one!
FileExportMode MODE_FILE_KEEP = 2
There is currently no description for this enum. Please help us by contributing one!
FileExportMode MODE_FILE_REMOVE = 3
There is currently no description for this enum. Please help us by contributing one!
enum ScriptExportMode: 🔗
ScriptExportMode MODE_SCRIPT_TEXT = 0
There is currently no description for this enum. Please help us by contributing one!
ScriptExportMode MODE_SCRIPT_BINARY_TOKENS = 1
There is currently no description for this enum. Please help us by contributing one!
ScriptExportMode MODE_SCRIPT_BINARY_TOKENS_COMPRESSED = 2
There is currently no description for this enum. Please help us by contributing one!
方法说明
bool are_advanced_options_enabled() const 🔗
如果导出对话框中打开了“高级”开关,则返回 true。
String get_custom_features() const 🔗
返回添加至该预设的自定义特性列表,是一个用英文逗号分隔的字符串。详见《特性标签》文档。
Dictionary get_customized_files() const 🔗
返回在导出对话框“资源”选项卡中选中的所有文件,是一个字典。字典的键是文件名,值是对应的导出模式 :"strip"、"keep" 或 "remove"。另见 get_file_export_mode()。
int get_customized_files_count() const 🔗
返回在导出对话框“资源”选项卡中选中的文件数。
bool get_encrypt_directory() const 🔗
如果导出对话框中启用了 PCK 目录加密,则返回 true。
bool get_encrypt_pck() const 🔗
如果导出对话框中启用了 PCK 加密,则返回 true。
String get_encryption_ex_filter() const 🔗
返回 PCK 加密时需要排除的文件过滤器。
String get_encryption_in_filter() const 🔗
返回 PCK 加密时需要包含的文件过滤器。
String get_encryption_key() const 🔗
返回 PCK 加密密钥。
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) 🔗
返回名为 name 的设置项的值,会使用导出预设特性标签覆盖,不使用当前操作系统的特性。
ScriptExportMode get_script_export_mode() const 🔗
返回 GDScript 文件的导出模式。0 表示“文本”,1 表示“二进制标记”,2 表示“压缩二进制标记(文件较小)”。
String get_version(name: StringName, windows_version: bool) const 🔗
返回预设的版本号,如果为空字符串则回退至 ProjectSettings.application/config/version 项目设置。
如果 windows_version 为 true,则会对返回的版本号进行格式化,让其与 Windows 可执行文件元数据兼容。
bool has(property: StringName) const 🔗
如果预设中存在名为 property 的属性,则返回 true。
bool has_export_file(path: String) 🔗
如果会导出路径为 path 的文件,则返回 true。
bool is_dedicated_server() const 🔗
如果导出对话框中选择了专用服务器导出模式,则返回 true。
如果为导出对话框中打开了“可执行”开关,则返回 true。