启动命令行选项
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影片设定#
Graphics Settings图形设定#
名称 | 描述 | 争论 | 默认值 |
---|---|---|---|
-video_app | Graphics API to be used for rendering:
|
"null"
"auto" "direct3d11" or "dx" "opengl" or "gl" "direct3d12" or "dx12" "vulkan" or "vk" |
"auto" |
-video_adapter | In case of several GPUs, allows selecting a GPU to be used.
Available for DirectX only.Available for DirectX only. Available for DirectX only.仅适用于DirectX。 |
The number of the GPU to be used.要使用的GPU的数量。 | 0 |
-video_debug | Enables or disables the debug context.启用或禁用调试上下文。 Enabling the debug context may cause performance drop (~30-40%).启用调试上下文可能会导致性能下降(〜30-40%)。 |
|
0 |
-video_debug_shader | Enables or disables debug shaders for the application regardless of its binary type (debug or release). This option should be enabled in case you use graphics debugging tools (e.g., the RenderDoc debugger). 启用或禁用应用程序的调试着色器,无论其二进制类型如何(debug 或 release)。 如果您使用图形调试工具(例如 RenderDoc 调试器),则应启用此选项。 | 0 to disable debug shaders (release shaders are used)
1 to enable debug shaders0 禁用调试着色器(使用发布着色器) 1 启用调试着色器 |
0 |
-video_quad_buffer | Enables or disables quad buffered stereo.启用 quad缓冲立体声。 | 0 to disable quad buffering
1 to enable quad buffering 0 禁用四倍缓冲 1 启用四元缓冲 |
0 |
-video_offscreen | Enables the offscreen mode for the application, making it possible to run UNIGINE Engine in a cloud and use powerful servers (e.g., to generate photorealistic datasets for deep learning and verification of AI algorithms). All windows in this mode are virtual, just like the display, user input is not available.为应用程序启用屏幕外模式,从而可以在云中运行 UNIGINE 引擎并使用强大的服务器(例如,为深度学习和 AI 算法验证生成逼真的数据集)。此模式下的所有窗口都是虚拟的,就像显示器一样,用户输入不可用。 | ||
-main_window | Enables creating a main window during the application start-up. After starting up the application any window can be created and will work normally. For example, this can be useful in a custom editor or any other application, where there should be no main Engine window.允许在应用程序启动期间创建主窗口。 启动应用程序后,可以创建任何窗口并正常工作。 例如,这在自定义编辑器或任何其他不应该有主引擎窗口的应用程序中很有用。 | 1 to enable creating a main window. 0 to disable creating a main window.1 启用创建主窗口。 0 禁用创建主窗口。 |
1 |
-auto_quit | Enables force closing of the Engine when all windows are closed.在关闭所有窗口时启用强制关闭引擎。 | 1 to enable force closing of the Engine. This value should be set when 0 is passed to -main_window. 0 to disable force closing of the Engine.1启用强制关闭引擎。当 0 传递给-main_window时,应设置此值。 0 禁用强制关闭引擎。 |
0 |
File System文件系统#
名称 | 描述 | 争论 | 默认值 |
---|---|---|---|
-data_path | A path to the data directory with all resources. The path can be specified as an absolute path or relatively to the binary executable. The specified -data_path directory can be obtained via the getDataPath() function.包含所有资源data的 目录的路径。可以将路径指定为绝对路径或相对于二进制可执行文件的路径。 可以通过getDataPath()函数获取指定的-data_path目录。 | The argument can be passed as follows:
|
../ |
-plugin_path | Path to a directory that contains plugins. All of the plugins in this directory will be loaded automatically on the start-up. The path can be specified relatively to the binary executable or as an absolute path. The list of the specified -plugin_path directories can be obtained via the getNumPluginPaths() and getPluginPath(int num) methods.包含插件的目录的路径。此目录中的所有插件将在启动时自动加载。 可以相对于二进制可执行文件指定路径,也可以将其指定为绝对路径。 可以通过getPluginPath(int num)和getPluginPath(int num)方法获取指定的-plugin_path目录的列表。 | The arguments can be passed as follows:
|
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 | Path to Startup Configuration File containing the engine start-up options. The path can be specified as an absolute path or relative to the -data_path or <project_name> folder if the -project_name is set.包含引擎启动选项的启动配置文件的路径。可以将路径指定为绝对路径或相对于-data_path的路径。 | The arguments can be passed as follows:
|
configs/default.boot |
-cache_path | A path to store system and editor cache files (specified by system_cache and editor_cache respectively). The path can be specified as an absolute path or relatively to the -data_path. For this parameter to take effect you should either delete existing system and editor cache files or move them to the new specified location.存储系统和编辑器缓存文件的路径(由system_cache和editor_cache分别)。该路径可以指定为绝对路径,也可以相对于-data_path. |
data/ | |
-editor_cache | A path to a cache file to be used by the UnigineEditor. The path can be specified as an absolute path or relatively to the -data_path, or to the -cache_path (if any). UnigineEditor要使用的缓存文件的路径。可以将路径指定为绝对路径,也可以指定为相对于-data_path或相对于-cache_path(如果有)的绝对路径。 | editor.cache | |
-system_cache | A path to a cache file to be used by the Engine. The path can be specified as an absolute path or relatively to the -data_path, or to the -cache_path (if any).引擎要使用的缓存文件的路径。可以将路径指定为绝对路径,也可以指定为相对于-data_path或相对于-cache_path(如果有)的绝对路径。 | unigine.cache | |
-engine_log | The log file to be created and used. The path can be specified as an absolute path or relatively to the binary executable. For relative paths, if the -project_name is set, the log file with the specified name will be created in the corresponding directory in the User profile (only the name will be used, the remaining part of the relative path will be discarded).要创建和使用的日志文件。可以将路径指定为绝对路径或相对于二进制可执行文件的路径。对于相对路径,如果设置了 -project_name ,则将在用户配置文件的相应目录中创建具有指定名称的日志文件(仅使用名称) ,相对路径的其余部分将被丢弃。) | log.txt | |
-gui_path | A path to a GUI skin to be used for the engine interface. The path can be specified as an absolute path or relatively to the -data_path.引擎界面要使用的GUI外观的路径。可以将路径指定为绝对路径或相对于-data_path的路径。 | core/gui/ | |
-project_name | Forces the engine to store all changing data (a log file, cache files and configuration files) in the User profile rather than in a directory with binaries. For that, a directory will be created with a specified PROJECT_NAME or a path to the project directory relative to the User profile (for example, unigine_projects/my_project).强制引擎将所有更改的数据(日志文件,缓存文件和配置文件)存储在用户配置文件中,而不是包含二进制文件的目录中。为此,将创建一个具有指定PROJECT_NAME的目录或相对于用户配置文件的项目目录的路径(例如unigine_projects/my_project)。 | PROJECT_NAME, namely:
Windows:Windows: C:/Users/<username>/my_project/ Linux:Linux: /home/<username>/.my_project/ Windows:Linux:A path to the project directory relative to the User profile. For example, -project_name unigine_projects/my_project will create my_project directory in the following directory:Windows:Windows: C:/Users/<username>/unigine_projects/ Linux:Linux: /home/<username>/.unigine_projects/ The specified unigine_projects folder must exist in the User profile.The specified unigine_projects folder must exist in the User profile.
|
|
-system_script | Path to the system script (specified relative to the data directory). 系统脚本的路径(相对于数据目录指定)。 | core/unigine.usc | |
-skip_guidsdb | The Engine ignores the guids.db file and searches for GUIDs among all .meta files inside the data folder and all mounted external directories and packages.
UnigineEditor uses this argument by default to avoid errors, and always re-generates the guids.db file to ensure its validity.UnigineEditor uses this argument by default to avoid errors, and always re-generates the guids.db file to ensure its validity. 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 | Console command to be used at the engine start-up. Several commands can be separated using the && sequence.在引擎启动时使用的 控制台命令。可以使用&&序列分隔几个命令。 | command <arguments> |
-console_history |
Sets the path to the file that stores the console command input history. The path to the file and its name should be specified.设置存储控制台命令输入历史的文件的路径。 应指定文件的路径及其名称。 If the path to the file is not specified, the file will be searched in directories the following sequence:如果未指定文件的路径,则会按以下顺序在目录中搜索文件:
If the file name is also not specified, the file with the default name console_history will be searched in the above-mentioned order.如果文件名也未指定,则将按照上述顺序搜索默认名称为 console_history 的文件。 |
<path_to_file/console_history_file_name> (the default is "bin/console_history")(默认情况下"bin/console_history") |
-extern_plugin | Load a plugin library (the path is specified relative to the binary executable).
(For example, libNetwork_x64d.so should be passed as "Network".) Several plugins are comma separated (no whitespace).If you want to clear the list of plugins (they are automatically loaded by the engine once specified on the start-up), simply pass "" as an argument to this command. 加载插件库(相对于二进制可执行文件指定了路径)。
|
The arguments can be specified as follows:
|
-extern_define | External definition to be used.要使用的外部定义。
Affects UnigineScript only.该参数仅影响 UnigineScript。 The current value of -extern_define can be obtained via the getExternDefine() method of Unigine API.当前值-extern_define可以通过getExternDefine()Unigine API的方法。 |
The arguments can be specified as follows:
|
-microprofile_enabled | Enables the Microprofile tool.启用Microprofile工具。 | 1 to enable the Microprofile tool. 0 to disable the Microprofile tool.1 启用 Microprofile 工具。 0 禁用 Microprofile 工具。 |
Sound Settings声音设定#
名称 | 描述 | 争论 | 默认值 |
---|---|---|---|
-sound_app | Sound API to be used:
|
null
auto openal |
auto |