启动命令行选项
Startup command-line options can be specified on the UNIGINE executable file launching. These options control what rendering API to use, what resolution to set for Unigine window, where resources for initializing the engine are stored, etc. The options are either set in UNIGINE SDK Browser or manually via the command line.可以在UNIGINE可执行文件启动时指定启动命令行选项。这些选项控制要使用的渲染API,为Unigine窗口设置的分辨率,用于存储引擎初始化的资源等。这些选项可以在 UNIGINE SDK浏览器中设置,也可以通过命令行手动设置
The syntax of command-line options is as follows: the full name of the binary executable (64-bit development or production version) is specified first and then the start-up options.命令行选项的语法如下:首先指定二进制可执行文件的全名(64位开发或生产版本),然后指定启动选项。
main_* -command argument
main_* -command "argument,argument"
main_* -console_command "command argument"
All paths are specified as absolute or relative to the binary executable or the data directory.所有路径均指定为绝对路径或相对于二进制可执行文件或data目录的路径。
If the same command is specified multiple times, only the last command will be taken into account by the engine. For example, in the following case, only the argument3 will be used by the Engine:如果多次指定同一命令,引擎将仅考虑最后一条命令。例如,在以下情况下,引擎将仅使用argument3:
-command "argument1" -command "argument2" -command "argument3"
- An exception is file system command-line options: they can accumulate all the specified values. 文件系统命令行选项是一个例外:它们可以累加所有指定的值。
- The CLI options specified on the application start-up always take precedence over the ones stored in the configuration files. Some of the CLI options can be changed through the console. Such options are automatically stored in the configuration files (this way, after the application is quit, they will be restored on the next start-up). All other CLI options don't change the configuration files.在应用程序启动时指定的CLI选项始终优先于存储在配置文件中的CLI选项。某些CLI选项可以通过控制台进行更改。这样的选项会自动存储在配置文件中(这样,退出应用程序后,它们将在下次启动时恢复)。所有其他CLI选项都不会更改配置文件。
Video Settings影片设定#
名称 | 描述 | 争论 | 默认值 |
---|---|---|---|
-main_window_size | 主窗口大小 | 宽度 高度 | 1600 900 |
-main_window_resizable | 允许即时更改窗口大小,而不必重新启动应用程序 | 0 对应于不可调整大小的模式
1对应于可调整大小的模式 |
0 |
-main_window_fullscreen | 主窗口的全屏模式 | 0 是窗口模式
1 是全屏模式 |
0 |
Graphics Settings图形设定#
名称 | 描述 | 争论 | 默认值 |
---|---|---|---|
-video_app | 用于渲染的图形API:
|
"null"
"auto" "direct3d11" or "dx" "direct3d12" or "dx12" "vulkan" or "vk" |
"auto" |
-video_adapter | 如果有多个GPU,则允许选择要使用的GPU。 | 要使用的GPU的数量。 | 0 |
-video_debug | 启用或禁用调试上下文。 注意
启用调试上下文可能会导致性能下降(〜30-40%)。 |
|
0 |
-video_debug_shader | 启用或禁用应用程序的调试着色器,无论其二进制类型如何(debug 或 release)。 如果您使用图形调试工具(例如 RenderDoc 调试器),则应启用此选项。 | 0 禁用调试着色器(使用发布着色器)
1 启用调试着色器 |
0 |
-video_offscreen | 为应用程序启用屏幕外模式,从而可以在云中运行 UNIGINE 引擎并使用强大的服务器(例如,为深度学习和 AI 算法验证生成逼真的数据集)。此模式下的所有窗口都是虚拟的,就像显示器一样,用户输入不可用。 | ||
-main_window | 允许在应用程序启动期间创建主窗口。 启动应用程序后,可以创建任何窗口并正常工作。 例如,这在自定义编辑器或任何其他不应该有主引擎窗口的应用程序中很有用。 | 1 启用创建主窗口。 0 禁用创建主窗口。 |
1 |
-auto_quit | 在关闭所有窗口时启用强制关闭引擎。 | 1启用强制关闭引擎。当 0 传递给-main_window时,应设置此值。 0 禁用强制关闭引擎。 |
0 |
File System文件系统#
名称 | 描述 | 争论 | 默认值 |
---|---|---|---|
-data_path | 包含所有资源data的 目录的路径。可以将路径指定为绝对路径或相对于二进制可执行文件的路径。 可以通过getDataPath()函数获取指定的-data_path目录。 | 该参数可以按以下方式传递:
|
../ |
-plugin_path | 包含插件的目录的路径。此目录中的所有插件将在启动时自动加载。 可以相对于二进制可执行文件指定路径,也可以将其指定为绝对路径。 可以通过getPluginPath(int num)和getPluginPath(int num)方法获取指定的-plugin_path目录的列表。 | 可以按以下方式传递参数:
|
plugins/ |
For several directories or packages you should specify each item separately without commas, for example:对于多个目录或软件包,应分别指定每个项目,且不要使用逗号,例如:
-plugin_path ../RELATIVE_PATH_1/ -plugin_path ../RELATIVE_PATH_2/ -plugin_path ABSOLUTE_PATH
Other Data其他资料#
名称 | 描述 | 争论 | 默认值 |
---|---|---|---|
-boot_config | 包含引擎启动选项的启动配置文件的路径。可以将路径指定为绝对路径或相对于-data_path的路径。 | 可以按以下方式传递参数:
|
configs/default.boot |
-cache_path | 存储系统和编辑器缓存文件的路径(由system_cache和editor_cache分别)。该路径可以指定为绝对路径,也可以相对于-data_path. | data/ | |
-editor_cache | UnigineEditor要使用的缓存文件的路径。可以将路径指定为绝对路径,也可以指定为相对于-data_path或相对于-cache_path(如果有)的绝对路径。 | editor.cache | |
-system_cache | 引擎要使用的缓存文件的路径。可以将路径指定为绝对路径,也可以指定为相对于-data_path或相对于-cache_path(如果有)的绝对路径。 | unigine.cache | |
-engine_log | 要创建和使用的日志文件。可以将路径指定为绝对路径或相对于二进制可执行文件的路径。对于相对路径,如果设置了 -project_name ,则将在用户配置文件的相应目录中创建具有指定名称的日志文件(仅使用名称) ,相对路径的其余部分将被丢弃。) | log.txt | |
-gui_path | 引擎界面要使用的GUI外观的路径。可以将路径指定为绝对路径或相对于-data_path的路径。 | core/gui/ | |
-project_name | 强制引擎将所有更改的数据(日志文件,缓存文件和配置文件)存储在用户配置文件中,而不是包含二进制文件的目录中。为此,将创建一个具有指定PROJECT_NAME的目录或相对于用户配置文件的项目目录的路径(例如unigine_projects/my_project)。 | PROJECT_NAME,即:
|
|
-system_script | 系统脚本的路径(相对于数据目录指定)。 | core/unigine.usc | |
-skip_guidsdb | 引擎将忽略guids.db文件,并在数据文件夹内的所有.meta文件以及所有已安装的外部目录和包中搜索GUID。
注意
UnigineEditor uses this argument by default to avoid errors, and always re-generates the guids.db file to ensure its validity.默认情况下,UnigineEditor使用此参数以避免错误,并始终重新生成guids.db文件以确保其有效性。 |
Engine-Related Settings引擎相关设置#
名称 | 描述 | 争论 |
---|---|---|
-console_command | 在引擎启动时使用的 控制台命令。可以使用&&序列分隔几个命令。 | command <arguments> |
-console_history |
设置存储控制台命令输入历史的文件的路径。 应指定文件的路径及其名称。 如果未指定文件的路径,则会按以下顺序在目录中搜索文件:
如果文件名也未指定,则将按照上述顺序搜索默认名称为 console_history 的文件。 |
<path_to_file/console_history_file_name> (默认情况下"bin/console_history") |
-extern_plugin | 加载插件库(相对于二进制可执行文件指定了路径)。
|
参数可以指定如下:
|
-extern_define | 要使用的外部定义。
注意
该参数仅影响 UnigineScript。 当前值-extern_define可以通过getExternDefine()Unigine API的方法选择。 |
参数可以指定如下:
|
-memory_statistics_enabled | 切换池配置所需的内存统计信息的收集。 |
1以便启用收集内存池配置所需的内存统计信息。 注意
默认情况下,发布版本的内存统计信息是禁用的。 |
-microprofile_enabled | 启用Microprofile工具。 | 1 启用 Microprofile 工具。 0 禁用 Microprofile 工具。 |
-async_init | 允许在引擎启动时并行初始化网格、属性和材质。如果禁用,网格、属性和材质的初始化将按顺序完成。 | 1 启用并行初始化(默认)。 0 按顺序初始化网格、属性和材质。 |
Sound Settings声音设定#
名称 | 描述 | 争论 | 默认值 |
---|---|---|---|
-sound_app | 使用的声音API:
|
null
auto openal |
auto |
-vr_app |
使用的VR:
当前值 -vr_app 可以通过 getApiName()Unigine API的方法选择。 |
null
auto openvr varjo |
null |
本页面上的信息适用于 UNIGINE 2.20 SDK.