启动命令行选项
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影片设定#
名称 | 描述 | 争论 | 默认值 |
---|---|---|---|
-video_mode | Video mode to set window resolution or size视频模式以设置窗口分辨率或大小 | -1 对应于 video_width ×video_height 0 对应于 640×360 1 对应于 960×540 2 对应于 1024×576 3 对应于 1280×720 4 对应于 1366×768 5 对应于 1600×900 6 对应于 1920×1080 7 对应于 2560×1440 8 对应于 3840×2160 9 对应于 640×400 10 对应于 960×600 11 对应于 1024×640 12 对应于 1280×800 13 对应于 1440×900 14 对应于 1680×1050 15 对应于 1920×1200 16 对应于 2560×1600 17 对应于 640×480 18 对应于 800×600 19 对应于 1024×768 20 对应于 1280×960 21 对应于 1280×1024 22 对应于 1600×1200 23 对应于 2048×1536 24 对应于 2560×2048 |
1 1 |
-video_width | Screen width
Makes sense only if video_mode =-1 屏幕宽度 #只有在 才有意义 video_mode = -1 |
0 –10000 | 0 |
-video_height | Screen height
Makes sense only if video_mode =-1 屏幕高度 #只有在 才有意义 video_mode = -1 |
0 –10000 | 0 |
-video_resizable | Allows changing a window size on the fly, without having to restart the application允许即时更改窗口大小,而不必重新启动应用程序 | 0 is a non-resizable mode
1 is a resizable mode 0 对应于不可调整大小的模式 1对应于可调整大小的模式 |
0 0 |
-video_fullscreen | Fullscreen mode全屏模式 | 0 is a windowed mode
1 is a fullscreen mode 2 is a fullwindow mode when an application window is rendered without decorations 0 是窗口模式 1 是全屏模式 2 是呈现应用程序窗口时不进行修饰的全窗口模式 |
0 0 |
Graphics Settings图形设定#
名称 | 描述 | 争论 | 默认值 |
---|---|---|---|
-video_app | Graphics API to be used for rendering:
|
"null"
"auto" "direct3d11" or "dx" "opengl" or "gl" |
"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 of OpenGL or DirectX.
Enabling the debug context may cause performance drop (~30-40%).Enabling the debug context may cause performance drop (~30-40%). Enabling the debug context may cause performance drop (~30-40%).启用调试上下文可能会导致性能下降(〜30-40%)。 |
DirectX:
|
0 |
-video_quad_buffer | Enables of disables quad buffered stereo.启用 quad缓冲立体声。 | 0 to disable quad buffering
1 to enable quad buffering 0 禁用四倍缓冲 1 启用四元缓冲 |
0 |
-video_surround | Allows rendering of the application across 3 monitors.允许跨3个监视器呈现应用程序。 | 0 to disable rendering across 3 monitors
1 to enable rendering across 3 monitors 0 禁用3台显示器的渲染 1 跨3台显示器渲染 |
0 |
-video_surround_border | Sets the size of monitor bezel compensation in pixels. It is used together with -video_surround 1.设置显示器边框补偿的大小(以像素为单位)。它与 -video_surround 1 一起使用。 | Size of the bezel compensation in pixels.边框补偿的大小(以像素为单位)。 | |
-video_vsync | Vertical synchronization (synchronize FPS with monitor's refresh rate)垂直同步(将FPS与监视器的刷新率同步) | 0 - don't use synchronization
1 - use synchronization 0 - 不要使用同步 1 - 使用同步 |
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 | |
-editor_script | Path to the editor script (specified relative to the data directory) 编辑器脚本的路径(相对于 data目录指定的链接) | ||
-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 | 在引擎启动时使用的 控制台命令。可以使用&&序列分隔几个命令。 | 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. 参数可以指定如下:
|
-extern_define | 要使用的外部定义。
|
External definition to be used.
(For example, -extern_define "TEST=42" .) If you want to clear all definitions, simply pass "" as an argument to this command. 参数可以指定如下:
|
Sound Settings声音设定#
名称 | 描述 | 争论 | 默认值 |
---|---|---|---|
-sound_app | 使用的声音API:
|
null
auto openal |
auto |