This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Startup Command-Line Options

To launch the Unigine executable file, it is necessary to specify a number of required options on its start-up. They control what rendering API to use, what resolution to set for Unigine window, where resources for initializing the engine are stored, etc. These parameters are either set in the browser or manually via the command line.

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 Unigine executable or data path, as indicated below).

Notice
Almost all command-line options can be changed through the console. All options available via the console are automatically stored in the configuration file unigine.cfg (this way, after the application is quit, they will be restored on the next start-up). Specified CLI options always override the ones stored in the configuration file.

Video Settings

NameDescriptionArgumentsDefault
video_modeVideo mode to set window resolution or size -1 is video_width×video_height
0 is 640x360
1 is 960x540
2 is 1024x576
3 is 1280x720
4 is 1366x768
5 is 1600x900
6 is 1920x1080
7 is 2560x1440
8 is 640x400
9 is 960x600
10 is 1024x640
11 is 1280x800
12 is 1440x900
13 is 1680x1050
14 is 1920x1200
15 is 2560x1600
16 is 640x480
17 is 800x600
18 is 1024x768
19 is 1280x960
20 is 1280x1024
21 is 1600x1200
22 is 2048x1536
23 is 2560x2048
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_resizableAllows to change 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_fullscreenFullscreen 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

NameDescriptionArgumentsDefault
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 9
  • Direct X 11
  • OpenGL

Only in mobile SDK:
  • OpenGL ES
  • DirectX 11 renderer of DirectX 9 feature level. (With this feature, you can check how applications are rendered on ARM mobile devices with Windows RT. Shadows are not supported in this mode due to hardware limitations.)

SDK with PLayStation support:
  • PlayStation 3
"null"
"auto"
"direct3d9"
"direct3d11"
"opengl"

"opengles"
"direct3d119"

"playstation3"
"auto"
video_vsyncVertical synchronization (synchronize FPS with monitor's refresh rate) 0 is not to use synchronization
1 is to use synchronization
0
video_refreshGraphics refresh rate 0200 0
video_multisampleHardware anti-aliasing mode 0 is no anti-aliasing
1 is 2x anti-aliasing
2 is 4x anti-aliasing
3 is 8x anti-aliasing
4 is 16x anti-aliasing
0
video_gammaGamma correction value 0.53.5 1.0

File System

NameDescriptionArgumentsDefault
data_path Path to the data directory with all resources (specified relative to the binary executable). This is a required command-line option. ../
extern_package UNG or ZIP package outside data directory to be added to the file system. This allows to access resources by specifying a relative path to the file only inside the package. Several packages are comma separated (no whitespace).
The path can be specified relative to the binary executable or as an absolute path.
"../RELATIVE_PATH"
"ABSOLUTE_PATH"
extern_directory A directory outside the data directory. The path can be specified relative to the binary executable or as an absolute path. "../RELATIVE_PATH/"
"ABSOLUTE_PATH/"

Other Data

NameDescriptionArgumentsDefault
engine_config The configuration file used to read and store all global engine-related and project-related settings (the path is specified relative to the binary executable) unigine.cfg
engine_log The log file to be created and used (the path is specified relative to the binary executable) log.html
system_script Path to the system script (specified relative to the data directory) core/unigine.cpp
editor_script Path to the editor script (specified relative to the data directory) core/editor/editor.cpp
gui_path A path to a GUI skin to be used for the engine interface. 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. PROJECT_NAME

Engine-related Settings

NameDescriptionArgumentsDefault
console_command Console command to be used at the engine start-up. Several commands can be separated using the && sequence. "command <its 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 clear the list plugins (they are automatically loaded by the engine once specified on the start-up), simply pass "" as an argument to this command.
"Plugin_name"
extern_define Extern #DEFINE to be used.
  • Several defines 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 defines, simply pass "" as an argument to this command.
"DEFINE_NAME"
"DEFINE_NAME=VALUE"

Sound Settings

NameDescriptionArgumentsDefault
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
  • PlayStation 3
"null"
"auto"
"openal"
"xaudio2"
"playstation3"
"auto"
Last update: 2017-07-03
Build: ()