Startup Command-Line Options
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.
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.
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.
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:
-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.
Video Settings#
Name | Description | Arguments | Default |
---|---|---|---|
-video_mode | Video mode to set window resolution or size | -1 is video_width ×video_height 0 is 640×360 1 is 960×540 2 is 1024×576 3 is 1280×720 4 is 1366×768 5 is 1600×900 6 is 1920×1080 7 is 2560×1440 8 is 3840×2160 9 is 640×400 10 is 960×600 11 is 1024×640 12 is 1280×800 13 is 1440×900 14 is 1680×1050 15 is 1920×1200 16 is 2560×1600 17 is 640×480 18 is 800×600 19 is 1024×768 20 is 1280×960 21 is 1280×1024 22 is 1600×1200 23 is 2048×1536 24 is 2560×2048 |
1 |
-video_width | Screen width
Makes sense only if video_mode =-1 |
0 –10000 | 0 |
-video_height | Screen height
Makes sense only if 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 |
-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 |
Graphics Settings#
Name | Description | Arguments | Default |
---|---|---|---|
-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. |
The number of the GPU to be used. | 0 |
-video_debug | Enables or disables the debug context of OpenGL or DirectX.
Enabling the debug context may cause performance drop (~30-40%). |
DirectX:
|
0 |
-video_quad_buffer | Enables of disables quad buffered stereo. | 0 to disable quad buffering
1 to enable quad buffering |
0 |
-video_surround | Allows rendering of the application across 3 monitors. | 0 to disable rendering across 3 monitors
1 to enable rendering across 3 monitors |
0 |
-video_surround_border | Sets the size of monitor bezel compensation in pixels. It is used together with -video_surround 1. | Size of the bezel compensation in pixels. | |
-video_vsync | Vertical synchronization (synchronize FPS with monitor's refresh rate) | 0 - don't use synchronization
1 - use synchronization |
0 |
File System#
Name | Description | Arguments | Default |
---|---|---|---|
-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. | 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. | 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#
Name | Description | Arguments | Default |
---|---|---|---|
-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. | 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. | 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). | 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). | 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). | log.txt | |
-editor_script | Path to the editor script (specified relative to the data directory) | ||
-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. | 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, namely:
|
|
-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. |
Engine-Related Settings#
Name | Description | Arguments |
---|---|---|
-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. |
<path_to_file/console_history_file_name> (the default is "bin/console_history") |
-extern_plugin | Load a plugin library (the path is specified relative to the binary executable).
|
The arguments can be specified as follows:
|
-extern_define | External definition to be used.
|
The arguments can be specified as follows:
|
Sound Settings#
Name | Description | Arguments | Default |
---|---|---|---|
-sound_app | Sound API to be used:
|
null
auto openal |
auto |