This page has been translated automatically.
编程
Fundamentals
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

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.

Notice
If no command-line options is specified, the options with default values will be used when launching the application.

The syntax of command-line options is as follows: the full name of the binary executable (32- or 64-bit, development or production version) is specified first and then the start-up options.

Shell commands
main_* -command argument
Shell commands
main_* -command "argument,argument"
Shell commands
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:

Shell commands
-command "argument1" -command "argument2" -command "argument3"
Notice
An exception is file system command-line options: they can accumulate all the specified values.

Notice
The CLI options specified on the application start-up always take precedence over the ones stored in the configuration file. Some of the CLI options can be changed through the console. Such options are automatically stored in the configuration file (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 file.

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
010000 0
-video_height Screen height
Makes sense only if video_mode=-1
010000 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:
  • No renderer: do not render anything onto the screen (for example, for servers in case of playing over the network)
  • Automatically choose the best option from available ones
  • Direct X 11
  • OpenGL
The current value of -video_app can be obtained via the getVideoApp()method of Unigine API.
"null"
"auto"
"direct3d11"
"opengl"
"auto"
-video_debug Enables or disables the debug context of OpenGL or DirectX 11. 0 to disable the debug context.
1 to enable the debug context.
0
-video_gamma Gamma correction value 0.53.5 1.0
-video_refresh Graphics refresh rate 0200 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
  • The first specified -data_path is always a path to the datadirectory with allresources.
  • The option can be specified multiple times: all additional-data_path options will refer to external resources.
The paths can be specified as an absolute path or relatively to the the binary executable.
The list of the specified -data_path directories can be obtained via the getNumDataPaths()andgetDataPath(int num)methods. ThegetDataPath()function without arguments will return the first specified-data_path directory.
The arguments can be passed as follows:
  • ../RELATIVE_PATH/
  • ABSOLUTE_PATH
../
-extern_package UNG or ZIP package outside the datadirectory to be added to the file system. This enables to access resources by specifying a relative path to the file only inside the package.
The path can be specified relatively to the binary executable or as an absolute path.
The arguments can be passed as follows:
  • ../RELATIVE_PATH/
  • ABSOLUTE_PATH
-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()andgetPluginPath(int num)methods. The arguments can be passed as follows:
  • ../RELATIVE_PATH/
  • ABSOLUTE_PATH
plugins/

Notice
Unlike the other command-line options, these 3 options can accumulate all the specified values. It allows specifying multiple paths, each of which will be used by the engine.
For several directories or packages you should specify each item separately without commas, for example:
Source code
-extern_package ../RELATIVE_PATH_1/ -extern_package ../RELATIVE_PATH_2/ -extern_package ABSOLUTE_PATH
The same rule is true for the -data_path and -plugin_path options.

Other Data

Name Description Arguments Default
-engine_config The configuration file used to read and store all global engine-related and project-related settings.
Notice
If the configuration file is stored in an .ung package, it won't be loaded and, therefore, the engine won't be initialized. However, when the file system is initialized, you can set the configuration file stored in the package via the config_load console command.
unigine.cfg
-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_nameis 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.html
-editor_plugin Loads the specified editor plugins. This command-line option should be used if the required editor plugins are located outside the data/editor/plugins directory. Paths to plugins should be relative to the datadirectory.
Notice
Several comma-separated plugins with no whitespaces can be specified.
../RELATIVE_PATH1/*.plugin, ../RELATIVE_PATH2/*.plugin, ...
-editor_script Path to the editor script (specified relative to the data directory) data/editor/editor.cpp
-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 first specified-data_path. core/gui/
-project_name Forces the engine to store all changing data (a log file, cache files and the configuration file) in the User profile rather than in a directory with binaries. For that, a directory will be created with a specified PROJECT_NAME. both a or a path to the project directory relative to the User profile (for example, unigine_projects/my_project). PROJECT_NAME, namely:
  • A name of the project directory. For example, -project_name my_project will create %userprofile%/my_project directory.
  • 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 %userprofile%/unigine_projects/ directory (note that such a folder must exist in the User profile).
-system_script Path to the system script (specified relative to the data directory). core/unigine.cpp

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>
-extern_plugin Load a plugin library (the path is specified relative to the binary executable).
  • The library name should go without any prefixes and postfixes.
    (For example, libNetwork_x86d.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:
  • PLUGIN_NAME
  • PLUGIN_NAME_1,PLUGIN_NAME_2,...,PLUGIN_NAME_N
-extern_define External definition to be used.
  • Several definitions are comma separated (no whitespace).
  • You can also use the following syntax: -extern_define "A=B,C=D".
    (For example, -extern_define  "TEST=42" .)
  • If you want to clear all definitions, simply pass "" as an argument to this command.
The current value of -extern_define can be obtained via the getExternDefines()method of Unigine API.
The arguments can be specified as follows:
  • DEFINITION_NAME
  • DEFINITION_NAME=VALUE
  • DEFINITION_NAME_1,DEFINITION_NAME_2,
    DEFINITION_NAME_3=VALUE,...,DEFINITION_NAME_N

Sound Settings

Name Description Arguments Default
-sound_app Sound API to be used:
  • No sound
  • Automatically choose the best sound library option from available ones (OpenAL)
  • OpenAL sound library
  • XAudio2 sound library
The current value of -sound_app can be obtained via the getSoundApp()method of Unigine API.
null
auto
openal
xaudio2
auto
Last update: 2017-07-03
Build: ()