This page has been translated automatically.
Getting Started
Migrating to UNIGINE 2.0
C++ API Migration
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Console

Represents standard input, output and error streams for the file loading, rendering system, audio and video systems, path-finding system, physics engine, file system and many others.

Can be opened in any UNIGINE-based application.

How to Open Console

A built-in console is called by pressing the grave accent (`) key, placed under the ESC key:

The console can be hidden by pressing the grave accent (`) key one more time. See how to assign another key here.

Console Operation

Console operation can be either command or variable:

  • Command is a directive to a console to perform a specific task.
  • Variable is an identifier that contains some stored value.

Command Syntax

Console command can take null, one or several arguments. The syntax is:

Source code
command_to_execute // null argument
command_to_execute argument // one argument
command_to_execute argument argument // two arguments

Hints

  • To see the current variable value, other acceptable values and short description, just type it and press the Enter key. For example, if you type the video_resizable variable, you get the following result:
    Source code
    video resizable toggle
    0 is non-resizable mode
    1 is resizable mode
    video_resizable = 1
    
  • To complete a command or variable name, just start typing first letters and press the TAB key until you get the required result.

How to Change the Console Opening Key

If you want to change the default grave accent (`) console turning on or off key, do one of the following actions:

  • Specify the console_command option and the console_key console command with ASCII-based key code in your CLI.
    For example, to assign the asterisk (*) key, type:
    Shell commands
    bin\main_x86d.exe -console_command "console_key 42"
    
  • Open the configuration file data/unigine.cfg and change the ASCII-based key code in the following line:
    Source code (XML)
    <item name="console_key" type="int">96</item>
    
  • Open the console and assign a new key via the console_command command.
    For example, to assign the (@) key, type:
    Source code
    Unigine~# console_command 64
    

Console

Basic operations on the console, command and variable.

NameDescriptionArguments
bind
  • Command. Bind a key to a command.

    For example, to bind the asterisk (*) key to the world_reload command, type:

    Source code
    Unigine~# bind * world_reload
    
1. A key to bind
2. A command to execute
clear
  • Command. Clear all messages from the console window.
console_key
  • Variable. Print the ASCII code of the current console turning on or off key.
  • Command. Assign a new key to turn on or off the console.
An ASCII code of the key
help
  • Command. Print the list of the built-in commands.
hide
  • Command. Hide the console.
ls
  • Command. Print a set of all available console keys, commands and variables.
show
  • Command. Show the console.
switch
  • Command. Switch among all variable values.
    Notice
    Make sure, that the variable is integer.

    For example, if you switch among the three render_hdr variable values, you get the following results:

    Source code
    render_hdr = 0 // disable HDR
    render_hdr = 1 // enable HDR using the standard algorithm
    render_hdr = 2 // enable HDR using the quadratic algorithm
    
A variable, which values will be switched
toggle
  • Command. Enable or disable a variable.
    Notice
    Enabled variable will have a default value.

    For example, if you toggle the show_visualizer variable, you will get the following result:

    Source code
    toggle show_visualizer
    show_visualizer = 0 // disable visualizer
    toggle show_visualizer
    show_visualizer = 1 // enable visualizer
    
A variable to be toggled
unbind
  • Command. Unbind a key from a command.
A key to unbind

Console GUI

Operations on the console GUI.

NameDescriptionArguments
console_size
  • Variable. Print a current size of the console font.
  • Command. Set a size for the console font.
432
(16 by default)
console_font
  • Variable. Print a current path to a *.ttf file used as a console font.
  • Command. Set a path to a *.ttf file to be used as a console font.
A path to a *.ttf file
(core/gui/console.ttf by default)

Engine

Basic operations on the engine.

NameDescriptionArguments
console_command
  • Variable. Print console commands passed on the current run.
    Notice
    If there are several commands, they are separated using the && sequence.
  • Command. Specify the new initial console commands.
engine_threaded
Notice
If these variables are enabled, multithreading is used.
0 - disabled
1 - enabled (by default)
extern_define
  • Variable. Print all used external #DEFINE directives.
  • Command. Specify an external #DEFINE directive. For example, to specify an external directive "TEST" with the value of 2, type:
    Source code
    extern_define "TEST=2"
    
    If you want to clear all defines, pass quotation marks ("") as an argument to this command.
    Notice
    If there are several commands, they are separated using the commas (without whitespace).
"DEFINE_NAME" - name of the directive
"DEFINE_NAME=VALUE" - name and value of the directive
"DEFINE_NAME_1,DEFINE_NAME_2,...,DEFINE_NAME_N" - several directives at once
extern_plugin
  • Variable. Print all loaded external plugins.
  • Command. Load an external plugin library.

    The library name should go without any prefixes and postfixes. For example, libNetwork_x86d.so should be passed as Network.

    Notice
    If there are several plugins, they are separated using the commas (without whitespace).
NAME - a name of a plugin to load
NAME_1,NAME_2,...,NAME_N - names of several plugins to load.
quit Quit the engine.

Engine Configuration File

General operations on the engine configuration.

NameDescriptionArguments
config_load
  • Variable. Print the current path to the engine configuration file.
  • Command. Set a new path to the engine configuration file.
A path to the configuration file
(data/unigine.cfg by default)
config_readonly
  • Variable. Print the value specifying if the data could be written to the configuration file.
  • Command. Specify if the data could be written to the configuration file.
0 - writing is allowed
1 - writing is forbidden
config_save
  • Command. Save the engine configuration file.
A path to the configuration file (optional)

Engine Analyzer

Operations on the engine debugging.

Notice
Available only for debug builds.
NameDescriptionArguments
engine_analyze
  • Command. Analyze the performance of the engine. Can be used only in the single-threaded mode. The information can be printed to the console or dumped into a specified file.
A path to the logfile to dump the log file information into (optional)

World

Basic operations on world.

NameDescriptionArguments
world_load
  • Command. Load the specified world. A cache file can also be specified for faster application loading.
1. A name of the world to load (inside of the data directory)
2. A name of the world cache file (optional)
world_quit
  • Command. Clear all the world data.
world_save
  • Command. Save the world.
world_reload
  • Command. Reload the world. A cache file can also be specified to be reloaded.
A name of the world cache file (optional)

World State

Serialized operations on world.

NameDescriptionArguments
state_save
  • Command. Save states of all world nodes into the .save file and take a screenshot.
    Notice
    File is saved as quicksave.save in the /bin/save directory by default. You can pass another directory as an argument.
1. A path to the file (optional)
2. A noscreenshot flag - save a state without taking a screenshot (optional)
state_restore
  • Command. Restore states of all world nodes.
    Notice
    File is restored using quicksave.save file in the /bin/save directory by default. You can pass another directory as an argument.
A path to the file (optional)

World Resources

Operations, representing information on ObjectGrass, ObjectMeshClutter and WorldClutter objects.

NameDescription
world_manager_info
  • Command. Print general information (the number of registered/loaded resources; used memory) on world manager resources, such as:
    1. ImageManaged - loaded images (if not fully loaded, a dummy texture or one-mipmap texture is used)
    2. PathManaged - loaded splines
    3. ImageStream - streamed mask images
    4. MeshStream - streamed meshes used as an intersection mask for grass or clutters
world_manager_list
  • Command. Print the list of resources handled by the world manager (mask images for ObjectGrass and WorldClutter objects), if any.
Notice
To get information on loaded meshes and images, see the Render resources section.

World Queueing

Operations on the world queued nodes.

NameDescriptionArguments
world_queue
  • Command. Print names of all the queued nodes, if any.
world_delay
  • Variable. Print the current time delay between loading of the queued nodes in seconds.
  • Command. Set the time delay between loading of the queued nodes in seconds. For example, this function can be used to debug streaming of resources.
01
(0 by default)
world_clear
  • Command. Clear the queue and all of the loaded nodes.

Sound

Operations on the sound.

NameDescriptionArguments
sound_app
  • Variable. Print the current sound API.
  • Command. Sound API to be used:
    • No sound
    • Automatically choose the best sound library option from available ones (OpenAL)
    • OpenAL sound library
    • XAudio2 sound library
"null" - no sound
"auto" - automatically (by default)
"openal" - OpenAL
"xaudio2" - XAudio2
sound_occlusion
  • Variable. Print the value indicating if sound occlusion is enabled.
  • Command. Occlude sound if other nodes are found in front of the sound source.
0 - disabled
1 - enabled (by default)
sound_reverb
  • Variable. Print the current sound reverberation mode.
  • Command. Set a sound reverberation mode.
0 - sound reverberation is disabled
1 - single-environment sound reverberation
2 - multi-environment sound reverberation (by default)

Sound Resources

Operations on the sound resources.

NameDescriptionArguments
sound_manager_load_samples
  • Variable. Print the value indicating if sound samples are preloaded on world loading.
  • Command. Preload sound samples on world loading (ensure there are no lags afterwards but increases loading time and memory footprint).
0 - disabled (by default)
1 - enabled
sound_manager_info
  • Command. Print general information on sound resources: the number of static and streamed sound sources (registered/loaded; memory used).
sound_manager_list
  • Command. Print the detailed list of sound files, if any, with used space.
sound_manager_sample_static_memory
  • Variable. Print the current cache memory limit for static sound resources in Mbytes.
  • Command. Set the cache memory limit for static sound resources in Mbytes.
11024
(64 by default)
sound_manager_sample_stream_memory
  • Variable. Print the current cache memory limit for streamed sound resources in Mbytes.
  • Command. Set the cache memory limit for streamed sound resources in Mbytes.
11024
(16 by default)

Camera

Operations for fast positioning of the game camera.

NameDescriptionArguments
camera_get Command. Get the current position of the game camera and its rotation (Euler angles).
camera_set Command. Set position and rotation (Euler angles) of the game camera.
Notice
Position and rotation of the game camera can be changed only if it is unlocked.
Source code
camera_set 20.0 19.0 3.0 0.0 45.0 90.0
							
The first 3 arguments set position.
The second 3 arguments set rotation (optional)

File System

Operations on the File system.

NameDescriptionArguments
data_path
  • Variable. Print the current path to the data directory containing all resources.
  • Command. Set a new path to the data directory.
A path to the data directory (relatively to the binary executable)
extern_path
  • Variable. Print the current path to the directory outside the data folder.
  • Command. Set a new path to the external directory.
Notice
You can specify several comma-separated directories with no whitespaces if it is necessary.
  • "../RELATIVE_PATH" - a relative path
  • "ABSOLUTE_PATH" - an absolute path
  • "../RELATIVE_PATH_1,RELATIVE_PATH_2,ABSOLUTE_PATH,..." - several paths
plugin_path
  • Variable. Print the current path to the directory that contains plugins. The path is relative to the binary executable.
  • Command. Set a new path to the directory that contains plugins. The path is relative to the binary executable.
Notice
You can specify several comma-separated plugin directories with no whitespaces if it is necessary.
  • "../RELATIVE_PATH" - a relative path
  • "../RELATIVE_PATH_1,../RELATIVE_PATH_2,..." - several relative paths
Notice
The default value is plugins/.
extern_package
  • Variable. Print UNG or ZIP packages outside the data directory added to the file system.
  • Command. Add UNG or ZIP packages outside the data directory. It is needed 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.
    Notice
    You can specify several comma-separated packages with no whitespaces if it is necessary.
  • "../RELATIVE_PATH" - relative path
  • "ABSOLUTE_PATH" - absolute path
  • "../RELATIVE_PATH_1,RELATIVE_PATH_2,ABSOLUTE_PATH,..." - several paths
filesystem_clear
  • Command. Remove all the loaded, but unused resources.
filesystem_icase
  • Variable. Print the value indicating if the case of file names in the data directory is ignored.
  • Command. Ignore the case of file names in the data directory.
0 - checked (by default)
1 - ignored
filesystem_ignore
  • Variable. Print the list of ignored directories.
  • Command. Set the folders to be ignored within the data directory. It can be used to discard version control system folders. This option comes into effect only after the filesystem_reload command is run.
    Notice
    Multiple values are comma separated (no whitespaces).
A full directory name
filesystem_mmap
  • Variable. Print the value indicating if memory-mapped files are used.
  • Command. Use memory-mapped files for faster access.
0 - not used
1 - used (default)
filesystem_reload
  • Command. Reload the file system, thereby update the list of files.

File System Info

Operations, representing information on the File system.

NameDescriptionArguments
filesystem_info
  • Command. Print general file system information (the total number of files and files per package).
filesystem_list
  • Command. Print the list of all files.

File Queueing

Operations, representing information on the file loading queue.

NameDescriptionArguments
filesystem_queue
  • Command. Print names of the queued files, if any.
filesystem_delay
  • Variable. Print the current time delay between the loading of the queued files in seconds.
  • Command. Set the time delay between loading of the queued files in seconds. For example, this function can be used to debug streaming of resources.
01
(0 by default)

Editor

Operations on UnigineEditor.

NameDescriptionArguments
editor_load
  • Command. Load UnigineEditor (both Qt and Unigine-native GUI will be loaded).
editor_quit
  • Command. Quit UnigineEditor (both Qt and Unigine-native GUI will be hidden).
editor_reload
  • Command. Reload UnigineEditor (both Qt and Unigine-native GUI will be reloaded). This command reloads the editor script, all unsaved changes are lost.
script_editor_load
  • Command. Load UnigineEditor (only Unigine-native GUI will be loaded).
script_editor_quit
  • Command. Quit UnigineEditor (only Unigine-native GUI will be hidden).
script_editor_reload
  • Command. Reload UnigineEditor (only Unigine-native GUI will be reloaded). This command reloads the editor script, all unsaved changes are lost.
editor_script A path to the editor script (relatively to the data directory)
editor_cache
  • Variable. Print the current editor script cache name.
  • Command. Set a new file name for the editor script cache.
A name of the editor script cache

Editor GUI

Operations on the UnigineEditor GUI:

NameDescriptionArguments
gui_path
  • Variable. Print a current path to a GUI skin for UnigineEditor.
  • Command. Set a path to a GUI skin to be used for UnigineEditor.
A path to the GUI skin
(core/gui/ by default)

Editor Controls

Operations on UnigineEditor controls.

NameDescriptionArguments
default_presets_edit_mode
  • Command. Enable or disable default preset editing.
0 (default) - disable editing
1 - enable editing

Asset Browser

Operations on assets.

NameDescriptionArguments
assets_delete
  • Variable. Print the current mode used to delete assets.
  • Command. Delete all assets by using the specified mode.
0 - delete assets from the the assets folder and the sub folders
1 - delete assets from the the assets folder and the sub folders and the corresponding assets in the runtime formats generated in the data folder.
assets_import Command. Import an asset from the external folder.
Notice
When importing an asset, the *.asset file with the same name is created in the destination folder.
Source code
assets_import 1 D:\external_assets\plane.fbx
							
The command receives 3 arguments:
  1. The flag indicating whether to copy the source asset from the external folder into the assets folder or to keep the link to this source file:
    • 0 - copy the source asset into the assets folder and store it together with the generated *.asset file.
    • 1 - do not copy the source asset and keep the link to it inside the generated *.asset file.
  2. An absolute path to the source asset.
  3. (optional) A destination folder relative to the assets folder.
assets_reload Command. Synchronize assets in the assets and the data folder.
assets_verbose
  • Variable. Print the current log level used for the asset system.
  • Command. Set the log level for the asset system.
0 - output only errors and warnings (by default)
1 - output all log information.

Scripts

Operations on the world, system and editor scripts.

World Script Analyzer

Operations on the world script debugging.

Notice
Available only for debug builds.

NameDescriptionArguments
world_memory_usage
  • Command. Print memory usage by the world script to the console or dump into a specified file.
A path to a file to dump the information into (optional)
world_analyze
  • Command. Analyze the performance of the world script. Can be used only in the single-threaded mode. The information can be printed to the console or dumped into a specified file.
A path to the logfile to dump the log file information into (optional)
world_disassemble
  • Command. Disassemble the world script. The information can be printed to the console or dumped into a specified file.
A path to a file to dump the information into (optional)
world_manager_images_memory
  • Variable. Print the cache memory limit set for images in MB.
  • Command. Set the cache memory limit for images in MB.
0 - 8192
(128 by default)
world_manager_meshes_memory
  • Variable. Print the cache memory limit set for meshes in MB.
  • Command. Set the cache memory limit for meshes in MB.
0 - 8192
(128 by default)

System Script

Operations on the system script.

NameDescriptionArguments
system_script
  • Variable. Print a path to the current system script.
  • Command. Set a path to a new system script.
A path to the system script (relatively to the data directory)
(core/unigine.cpp by default)
system_reload
  • Command. Restart the system script.
system_cache
  • Variable. Print a current file name of the system script cache.
  • Command. Set a new file name of the system script cache.
A name of the system script cache
(unigine.cache by default)

System Script Analyzer

Operations on the system script debugging.

Notice
Available only for debug builds.

NameDescriptionArguments
system_memory_usage
  • Command. Print memory usage by the system script to the console or dump into a specified file.
A path to a file to dump the information into (optional)
system_analyze
  • Command. Analyze the performance of the system script. Can be used only in the single-threaded mode. The information can be printed to the console or dumped into a specified file.
A path to the file to dump the log file information into (optional)
system_disassemble
  • Command. Disassemble the system script. The information can be printed to the console or dumped into a specified file.
A path to the file to dump the information into (optional)

Editor Script Analyzer

Debug operations on the editor script.

Notice
Available only for debug builds.

NameDescriptionArguments
editor_memory_usage
  • Command. Print memory usage by the editor script to the console or dump into a specified file.
A path to a file to dump the information into (optional)
editor_analyze
  • Command. Analyze the performance of the editor script. Can be used only in the single-threaded mode. The information can be printed to the console or dumped into a specified file.
A path to the file to dump the log file information into (optional)
editor_disassemble
  • Command. Disassemble the editor script. The information can be printed to the console or dumped into a specified file.
A path to file to dump the information into (optional)

Script Debugger

Operations on the per-function breakpoint. The syntax to set the breakpoint is the following:

Source code
system_breakpoint/world_breakpoint/editor_breakpoint set/remove function_name number_of_arguments
NameDescriptionArguments
world_breakpoint
  • Command. Set a breakpoint to the specified function in the world script.
The syntax to set the breakpoint is the following:
Source code
world_breakpoint set/remove function_name number_of_arguments
								
1. Name of the function
2. The number of the arguments
system_breakpoint
  • Command. Set a breakpoint to the specified function in the system script.
The syntax to set the breakpoint is the following:
Source code
system_breakpoint set/remove function_name number_of_arguments
							
1. Name of the function
2. The number of the arguments
editor_breakpoint
  • Command. Set a breakpoint to the specified function in the editor script.
The syntax to set the breakpoint is the following:
Source code
editor_breakpoint set/remove function_name number_of_arguments
								
1. Name of the function
2. The number of the arguments

Multi-Threading

NameDescriptionArguments
world_threaded
  • Variable. Print the thread mode used to update the world.
  • Command. Specify if the world will be updated in a single or multiple-threaded mode.
0 - single-threaded
1 - multiple-threaded (by default)
physics_threaded
  • Variable. Print the value indicating how many threads are used to perform physical calculations.
  • Command. Set a number of threads used to perform physical calculations.
0 - separate thread is not used at all
1 - one separate thread is used
2 - all available CPUs are used to perform multi-threaded physical calculations (by default)
pathfind_threaded
  • Variable. Print the value indicating how many threads are used to perform physical calculations.
  • Command. Set a number of threads used to perform physical calculations.
0 - separate thread is not used at all
1 - one separate thread is used
2 - all available CPUs are used to perform multi-threaded physical calculations (by default)

Asynchronous Operations

Asynchronous operations.

NameDescriptionArguments
async_log_mode
  • Variable. Print the value indicating which engine component's operations are shown.
  • Command. Print the list of asynchronous operations (loading / unloading of images, meshes, files, etc.) related to the specified engine component.
    Notice
    You can specify whether only loading and unloading operations, or all operations should be shown.
0 - do not print
1 - print operations with the nodes
2 - print operations with the renderer resources (loading / unloading of meshes and textures)
3 - print operations with the file system resources (loading / unloading of files)
2 - print all operations with the nodes, renderer and file systems resources
async_log_priority
  • Variable. Print the value indicating whether only loading and unloading operations, or all operations are shown via async_log_mode.
  • Command. Specify whether only loading and unloading operations, or all operations will be shown via async_log_mode.
0 - print only frequently used operations
1 - print all operations

Visualizer

Operations on the visualizer.

Notice
To debug the world and objects within it, the show_visualizer command should be set to 1.
NameDescriptionArguments
show_visualizer
  • Variable. Print the current visualizer mode.
  • Command. Specify if the visualizer geometry (bounding volumes, wireframe, physics bodies and shapes, etc.) is shown.
0 - visualizer is not shown (by default)
1 - visualizer is shown with a depth testing (to check if other objects in the scene do not occlude visualized geometry)
2 - visualizer is shown without a depth testing (visualized geometry is rendered in front of all objects in the scene)
show_fps
  • Variable. Print the value indicating if the FPS counter is hidden.
  • Command. Show or hide the FPS counter.
0 - hide the FPS counter
1 - display the FPS counter (by default)
2 - display the FPS counter and statistics on the last 600 frames: minimum FPS, maximum FPS and average FPS for the last 600 frames.
show_messages
  • Variable. Print the value indicating if the system messages are displayed in the viewport.
  • Command. Hide the system messages.
0 - hidden
1 - displayed (by default)

World Debugging

Operations on the world debugging.

NameDescriptionArguments
world_show_spatial
  • Variable. Print the value indicating if the scene spatial tree is displayed.
  • Command. Display the scene spatial tree.
0 - hidden (by default)
1 - displayed
world_show_visualizer
  • Variable. Print the list of node types for which the visualizer is displayed.
  • Command. Set node types for which the visualizer is displayed.
The available arguments are:
  • all
  • world
  • field
  • light
  • decal
  • object
  • player
  • physical
  • navigation
  • obstacle
  • sound
To hide the visualizer, pass "" as a argument.
render_show_triangles
  • Variable. Print the current wireframe mode for scene triangles.
  • Command. Set the wireframe mode for scene triangles.
0 - triangles are hidden (by default)
1 - front faces with the depth test are shown
2 - front faces without the depth test are shown
3 - front and back faces without the depth test are shown

Node Debugging

Operations on the node debugging.

NameDescriptionArguments
world_show_handler
  • Variable. Print the value indicating if nodes handlers for lights, particle systems, sectors, portals and so on are displayed.
  • Command. Display nodes handlers for lights, particle systems, sectors, portals, etc.
The available arguments are:
  • all
  • world
  • field
  • light
  • decal
  • object
  • player
  • physical
  • navigation
  • obstacle
  • sound
To hide the visualizer, pass "" as an argument.
render_show_decals
  • Variable. Print the value indicating if the wireframe for decals is displayed.
  • Command. Display the wireframe for decals.
0 - hidden (by default)
1 - displayed

Occluder Debugging

Operations on the occluder debugging.

NameDescriptionArguments
render_show_occluder
  • Variable. Print the value indicating if buffer used for occluders is displayed in the viewport.
  • Command. Display buffer used for occluders displayed in the viewport.
0 - hidden (by default)
1 - displayed

Physics Debugging

NameDescriptionArguments
physics_show_contacts
  • Variable. Print the value indicating if contact points between physical bodies are displayed.
  • Command. Display contact points between physical bodies.
0 - hidden (by default)
1 - displayed
physics_show_joints
  • Variable. Print the value indicating if joints between physical bodies are displayed.
  • Command. Display joints between physical bodies.
0 - hidden (by default)
1 - displayed
physics_show_shapes
  • Variable. Print the value indicating if collision shapes for physical bodies are displayed.
  • Command. Display collision shapes for physical bodies.
0 - hidden (by default)
1 - displayed

Texture Debugging

Operations on the texture debugging.

NameDescriptionArguments
render_show_mipmaps
  • Variable. Print the value indicating if mipmap levels are displayed in color.
  • Command. Display mipmap levels in color.
0 - hidden (by default)
1 - displayed in color
render_show_normals
  • Variable. Print the value indicating if texture normals are displayed.
  • Command. Display texture normals.
0 - hidden (by default)
1 - displayed

Occlusion Queries

NameDescriptionArguments
render_show_queries
  • Variable. Print the value indicating if occlusion query boxes are displayed.
  • Command. Display occlusion query boxes.
    Notice
    Make sure that the Culled by occlusion query flag is set for nodes.
0 - hidden (by default)
1 - displayed

Performance Profiler

Operations on the Performance profiler.

NameDescriptionArguments
show_profiler
  • Variable. Print a mode set to Performance profiler.
  • Command. Specify a mode for Performance profiler.
0 - profiler information is hidden (by default)
1 - generic profiler information is shown
2 - rendering profiler information is shown
3 - physics profiler information is shown
4 - world profiler information is shown
5 - pathfinding and sound usage profiler information is shown
render_profiler 0 - disabled (by default)
1 - enabled

Profiler GUI

Operations on the Performance profiler style.

NameDescriptionArguments
profiler_size
  • Variable. Print a current size of the profiler font.
  • Command. Set a size for the profiler font.
432
(13 by default)
profiler_font
  • Variable. Print a current path to a *.ttf file used as a profiler font.
  • Command. Set a path to a *.ttf file to be used as a profiler font.
A path to a *.ttf file
(core/gui/font.ttf by default)

Video Settings

Notice
To come to effect, the commands below require video_restart to be run after them.

NameDescription
video_restart
  • Command. Restart the video application to apply changes to video settings, if any.

Resolution and Full Screen

Operations on the video resolution adjustment.

NameDescriptionArguments
video_mode
  • Variable. Print the current video resolution mode.
  • Command. Set a new video resolution mode.
-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
video_width
  • Variable. Print the current screen width.
  • Command. Set the custom screen width.
Notice
Valid only if the video_mode command is set to -1.
010000
video_height
  • Variable. Print the current screen height.
  • Command. Set the custom screen height.
Notice
Valid only if the video_mode command is set to -1.
010000
video_resizable
  • Variable. Print the value indicating if the application window is resizable.
  • Command. Set a resizable mode for an application window (its size can be changed on the fly without restarting the application).
0 - non-resizable mode (by default)
1 - resizable mode
video_fullscreen
  • Variable. Print the value indicating if the application is running in full-screen mode.
  • Command. Set full-screen mode for the application window.
0 - windowed mode (by default)
1 - full-screen mode
2 - full-window mode when an application window is rendered without decorations

Graphics Settings

Operations on the graphics adjustment.

NameDescriptionArguments
video_app
  • Variable. Print the current graphics API used for rendering.
  • Command. Set a graphics API to be used for rendering:
    • Do not render anything onto the screen (for example, for servers, in case of playing on the network)
    • Automatically choose the best option from available ones
    • Use DirectX 11
    • Use OpenGL
"null" - no renderer
"auto" (by default) - automatically
"direct3d11" - DirectX 11
"opengl" - OpenGL
video_vsync
  • Variable. Print the value indicating if the vertical FPS synchronization is enabled.
  • Command. Set the vertical FPS synchronization.
0 - not to synchronize FPS (by default)
1 - synchronize FPS
video_refresh
  • Variable. Print the current graphics refresh rate.
  • Command. Set the graphics refresh rate.
0 (by default) – 200
video_gamma
  • Variable. Print the current gamma correction value.
  • Command. Set the gamma correction value.
0.53.5
(1.0 by default)

Multi-Monitor and Stereo Rendering

NameDescriptionArguments
video_surround
  • Variable. Print a value indicating whether rendering across 3 monitors is enabled or not.
  • Command.Enable or disable rendering of the application across 3 monitors.
0 - disabled (by default)
1 - enabled
video_surround_border
  • Variable. Print the size of monitor bezel compensation in pixels.
  • Command. Set the size of monitor bezel compensation in pixels. It is used together with video_surround enabled.
video_quad_buffer
  • Variable. Print a value indicating if quad buffering is enabled.
  • Command.Enable quad buffered stereo.
0 - disabled (by default)
1 - enabled

Rendering Settings

Operations on the renderer.

NameDescriptionArguments
shader_reload
  • Command. Reload the renderer. This command reloads all shaders (but does not update shader variables - it is done automatically). It can also be called, for example, for graphics API changes to come to effect.
render_manager_reload
  • Command. Reload all render manager resources. You can specify an optional argument to reload resources selectively.
  • mesh - reload only meshes
  • texture - reload only textures

Rendering Resources

Operations, representing information on the rendering resources.

NameDescription
render_manager_info
  • Command. Print general information (the number of registered/loaded resources; memory used) on renderer manager resources:
    1. Mesh - loaded meshes
    2. MeshSkinned - skinned meshes
    3. MeshDynamic - dynamic meshes stored in the memory rather than on disk
    4. TextureManaged - images loaded into the memory; if image is not fully loaded, a dummy texture or a mipmap texture is used
    5. TextureStream - streamed images
render_manager_list
  • Command. Print the list of loaded resources and detailed information regarding:
    1. Meshes, MeshSkinned and MeshDynamic with used memory
    2. TextureManaged (textures loaded into memory at once) and TextureStream (textures streamed on demand) with texture format, used compression, if any, texture dimensions and size (available only for already loaded textures).

Rendering Buffers

Rendering Buffer Info

Operations, representing information on the rendering buffers.

NameDescription
render_info
  • Command. Print general information on render buffers:
    1. Renderer - GPU and available video memory
    2. Per-type information on buffers created by the renderer, their number and used space
    3. Total - how much video memory is used in whole
render_list
  • Command. Print the detailed list of render buffers, with texture size, format and used space.

Rendering Buffer Debugging

Operations on the rendering buffer debugging.

NameDescriptionArguments
render_show_textures
  • Variable. Print the current set of buffers used by the renderer.
  • Command. Specify a set of buffers used by the renderer (how many buffers are shown depends on the number of buffers in a row specified by the render_show_number) command.
0 - all buffers are hidden (by default)
A number of buffers (can be up to 16)
render_show_number
  • Variable. Print the current number of buffers in a row to be output to the screen.
  • Command. Set the number of buffers in a row to be output to the screen.
A number of buffers in a row (from 1 to 8)
(4 by default).
1 - a single texture per screen
2 - 4 textures per screen
3 - 9 textures per screen
4 - 16 textures per screen

Rendering Passes

Operations on rendering passes.

NameDescriptionArguments
render_skip_post_materials 0 - enabled (by default)
1 - skipped
render_skip_render_materials 0 - enabled (by default)
1 - skipped
render_skip_transparent_ambient
  • Variable. Print the value indicating if the ambient rendering pass is skipped for transparent objects rendering.
  • Command. Skip the ambient rendering pass for transparent objects rendering.
Notice
This console command takes effect only when the forward rendering pass is used for transparent objects rendering.
0 - enabled (by default)
1 - skipped
render_skip_transparent_light
  • Variable. Print the value indicating if the rendering pass for world lights is skipped for transparent objects rendering.
  • Command. Skip the world lights' rendering pass for transparent objects rendering.
Notice
This console command takes effect only when the forward rendering pass is used for transparent objects rendering.
0 - enabled (by default)
1 - skipped

Meshes

Operations on the mesh rendering.

NameDescriptionArguments
render_alpha_fade
  • Variable. Print the value indicating if alpha fading (dithering) is enabled for objects.
  • Command. Use alpha fading (dithering) for objects.
0 - disabled
1 - enabled (by default)

Mesh Loading

Operations on the mesh loading.

NameDescriptionArguments
render_manager_create_dummy_meshes
  • Variable. Print the current loading mode for the dummy meshes.
  • Command. Preload dummy meshes (without any vertex data, only surfaces) on the world start-up. Meshes with full geometry data are loaded on demand, when they get into the view frustum. This option increases the world loading time, but safeguards against any lags on resource loading in run-time.
    Notice
    This command doesn't force loading of meshes of ObjectMeshStatic, ObjectMeshClutter and ObjectMeshCluster.
0 - dummy meshes are loaded only when they get into a view frustum
1 - dummy meshes are preloaded on the start-up (by default)
render_manager_create_meshes
  • Variable. Print the current loading mode for all meshes.
  • Command. Load all meshes on the start-up. This option insures against any lags on mesh loading at run-time, but increases world loading time.
    Notice
    This command doesn't force loading of meshes of ObjectMeshStatic, ObjectMeshClutter and ObjectMeshCluster.
0 - meshes are loaded only when they get into a view frustum (by default)
1 - meshes are preloaded on the start-up
render_manager_meshes_memory
  • Variable. Print the current cache memory limits for meshes, in percents of the total GPU memory.
  • Command. Set the cache memory limits for meshes, in percents of the total GPU memory.
0 - 100
(15 by default)

Decals

Operations on the mesh rendering.

NameDescriptionArguments
render_decals
  • Variable. Print the value indicating if decals should be rendered.
  • Command. Render decals.
0 - disabled
1 - enabled (by default)

Textures

Operations on the texture rendering.

NameDescriptionArguments
render_textures_quality
  • Variable. Print the current texture resolution.
  • Command. Set the texture resolution.
0 - low resolution
1 - medium resolution
2 - high resolution (by default)
render_filter
  • Variable. Print the current texture filtering mode.
  • Command. Set the texture filtering mode.
0 - bilinear filtering
1 - trilinear filtering (by default)
render_anisotropy
  • Variable. Print the current texture anisotropy level.
  • Command. Set the texture anisotropy level.
0 - level 1
1 - level 2 (by default)
2 - level 4
3 - level 8
4 - level 16

Texture Loading

Operations on the texture loading.

NameDescriptionArguments
render_manager_textures_memory
  • Variable. Print the current cache memory limits for textures, in percents of the total GPU memory.
  • Command. Set the cache memory limits for textures, in percents of the total GPU memory.
0 - 100
(65 by default)

Shaders

Operations on shaders.

NameDescriptionArguments
render_shader_defines
  • Command. Print the macros list related to the renderer (defines to make corresponding resources available in shaders).
render_shaders_quality
  • Variable. Print the current shader quality.
  • Command. Set the shader quality.
0 - low
1 - medium (by default)
2 - high

Shader Loading

Operations on the shader loading.

NameDescriptionArguments
render_manager_check_shaders
  • Variable. Print the value indicating if shaders are cached and compiled on the start-up.
  • Command. Compile all shaders on start-up and cache them. This option is for debugging purposes only. In the release version of the project it should be always turned off. (Shader cache file is too big to be used in release projects as well).
0 - non-compiled (by default)
1 - compiled
render_manager_create_shaders
  • Variable. Print the value indicating if shaders are compiled on the start-up.
  • Command. Compile all shaders that are used in the loaded world on start-up.
0 - non-compiled (by default)
1 - compiled

Effects and Postprocesses

Operations on the effects and postprocesses.

NameDescriptionArguments
render_auxiliary
  • Variable. Print the value indicating if the auxiliary render buffer is enabled.
  • Command. Enable auxiliary render buffer (should be enabled for render and post post-processes to work)
0 - disabled
1 - enabled (by default)
render_dof
  • Variable. Print the value indicating if the Gaussian blur depth of field effect is enabled.
  • Command. Enable the Gaussian blur depth of field effect.
0 - disabled (by default)
1 - enabled
render_taa
  • Variable. Print the value indicating if temporal anti-aliasing is enabled.
  • Command. Enable or disable temporal anti-aliasing.
0 - disabled
1 - enabled
render_filmic
  • Variable. Print the value indicating if the filmic high-dynamic range color correction rendering is enabled.
  • Command. Enable the filmic high-dynamic range color correction rendering.
0 - disabled (by default)
1 - enabled
render_bloom
  • Variable. Print the value indicating if the bloom effect is enabled.
  • Command. Enable the bloom effect.
0 - disabled (by default)
1 - enabled
render_bloom_quality
  • Variable. Print the value indicating the quality of the bloom effect.
  • Command. Set the quality of the bloom effect.
0 - half resolution
1 - full resolution (by default)
render_bloom_simple
  • Variable. Print the value indicating if the simplified bloom effect is enabled.
  • Command. Enable the simplified bloom effect.
0 - disabled (by default)
1 - enabled
render_bokeh
  • Variable. Print the value indicating if the bokeh effect is enabled.
  • Command. Enable the bokeh effect.
0 - disabled (by default)
1 - enabled
render_cross
  • Variable. Print the value indicating if the cross flares effect is enabled.
  • Command. Enable the cross flares effect.
0 - disabled
1 - enabled (by default)
render_exposure
  • Variable. Print the value indicating if the adaptive exposure effect is enabled.
  • Command. Enable the adaptive exposure effect.
0 - disabled
1 - enabled (by default)
render_exposure_mode
  • Variable. Print the value indicating what mode of the adaptive exposure effect is enabled.
  • Command. Change the mode of the adaptive exposure effect.
0 - disabled
1 - logarithmic adaptive exposure
2 - quadratic adaptive exposure
render_lens
  • Variable. Print the value indicating if the lens flares effect is enabled.
  • Command. Enable the lens flares effect.
0 - disabled (by default)
1 - enabled
render_motion_blur
  • Variable. Print the value indicating if the motion blur effect is enabled.
  • Command. Enable the motion blur effect.
0 - disabled
1 - enabled (by default)
render_reflection
  • Variable. Print the value indicating if dynamic reflection is enabled.
  • Command. Enable dynamic reflection.
0 - disable
1 - enabled (by default)
render_reflection_lods
  • Variable. Print the value indicating if dynamic reflections is enabled.
  • Command. Enable reduction of resolution of dynamic reflections when the camera moves away.
0 - disable
1 - enabled (by default)
render_refraction
  • Variable. Print the value indicating if refraction is enabled.
  • Command. Enable refraction.
0 - disabled
1 - enabled (by default)
render_scattering
  • Variable. Print the value indicating if the light scattering is enabled.
  • Command. Enable the light scattering.
0 - disabled
1 - enabled (by default)
render_sharpen
  • Variable. Print the value indicating if the sharpening effect is enabled.
  • Command. Enable or disable the sharpening effect.
0 - disabled (by default)
1 - enabled
render_stereo
  • Variable. Print the value indicating the current stereo rendering mode.
  • Command. Set the stereo rendering mode (it is not possible to set a stereo mode via a console if a default system script is used; it allows for setting it only on the start-up).
0 - disabled (by default)
1 - enabled anaglyph stereo
2 - enabled side-by-side stereo
3 - enabled top-bottom stereo
render_ssr
  • Variable. Print the value indicating if screen space reflections are enabled.
  • Command. Enable or disable screen space reflections.
0 - disabled
1 - enabled (by default)
render_ssr_quality
  • Variable. Print the value indicating the quality of screen space reflections.
  • Command. Set the quality of screen space reflections.
0 - ssr half resolution.
1 - ssr full resolution

Lighting and Shading

Operations on the lighting and shading.

NameDescriptionArguments
render_shadows
  • Variable. Print a value indicating whether shadows are rendered or not.
  • Command. Enable or disable shadows rendering.
0 - skip shadows rendering
1 (default) - enable shadows rendering
render_ssao
  • Variable. Print the value indicating whether screen-space ambient occlusion is enabled.
  • Command. Use screen-space ambient occlusion.
0 - disable SSAO
1 - use SSAO
render_ssao_quality
  • Variable. Print the value indicating the quality of screen-space ambient occlusion.
  • Command. Set screen-space ambient occlusion quality.
0 - ssao half resolution
1 - ssao full resolution
render_parallax
  • Variable. Print the value indicating if the parallax occlusion mapping is enabled.
  • Command. Enable parallax occlusion mapping.
0 - disabled
1 - enabled (by default)
render_surface_light_map
  • Variable. Print the value indicating if the surface lightmap is enabled.
  • Command. Enable surface lightmap usage.
0 - skip surface light map
1 - use surface light map (by default)
render_surface_ao
  • Variable. Print the value indicating if the surface ambient occlusion is enabled.
  • Command. Enable surface ambient occlusion.
0 - skip surface ambient occlusion
1 - use surface occlusion (by default)

Lights

Operations on lights.

NameDescriptionArguments
render_show_lights
  • Variable. Print the value indicating if the light areas are displayed without attenuation.
  • Command. Display light areas without attenuation.
0 - lights are faded (by default)
1 - lights are displayed without attenuation
render_show_scissors
  • Variable. Print the value indicating if scissor rectangles are shown.
  • Command. Enable scissor rectangles.
0 - hidden (by default)
1 - shown

Shadows

Operations on shadows.

NameDescriptionArguments
render_shadow_shafts
  • Variable. Print the value indicating if shadow shafts are enabled.
  • Command. Enable shadows shafts.
0 - disabled
1 - enabled (by default)
render_sun_shafts
  • Variable. Print the value indicating if sun shadows shafts are enabled.
  • Command. Enable sun shadows.
0 - disabled
1 - enabled (by default)
render_show_splits
  • Variable. Print the value indicating if Parallel Split Shadow Map (PSSM) splits for world lights are enabled.
  • Command. Enable Parallel Split Shadow Map (PSSM) splits for world lights.
0 - disabled (by default)
1 - enabled
render_show_penumbra
  • Variable. Print the value indicating if penumbra (half-shade regions) in color is enabled.
  • Command. Enable penumbra (half-shade regions).
0 - disabled (by default)
1 - enabled

Water Tessellation

Notice
The commands described below affect only global water (the ObjectWater class).
NameDescriptionArguments
render_water_resolution_low
  • Variable. Print the current size of the cell of the water grid that is used when there are no water waves and post refraction is enabled.
  • Command. Sets the size of the cell of the water grid that is used when there are no water waves (the amplitude of waves is set to 0) and post refraction is enabled.
2 - 1024
32 by default
render_water_resolution_high
  • Variable. Print the current size of the cell of the water grid that is used when waves are simulated.
  • Command. Sets the size of the cell of the water grid that is used when water waves are simulated (the amplitude of waves is nonzero).
2 - 1024
128 by default

Other Settings

NameDescriptionArguments
render_queries
  • Variable. Print the value indicating if a query test is run.
  • Command. Run an additional hardware occlusion query test before sending date to the GPU.
Notice
Make sure that the Culled by occlusion query flag is set for nodes.
0 - not run
1 - run (by default)

Renderers

NameDescriptionArguments
video_debug
  • Variable. Print the value indicating if the debug context is enabled or not.
  • Command. Enable the debug context of OpenGL or DirectX 11. To come to effect, the command requires video_restart to be run after it.
    Notice
    Enabling the debug context may cause performance drop (~30-40%).
0 - not enabled (by default)
1 - enabled

DirectX 11

Operations on the Direct3D11 API.

NameDescriptionArguments
d3d11_render_desc
  • Command. Print the information about the hardware configuration.
d3d11_render_use_compute_shader_11
  • Variable. Print the value indicating if the Direct3D 11 level compute shader is applied.
  • Command. Apply the Direct3D 11 level compute shader.
0 - not applied
1 - applied (by default)
d3d11_render_use_tessellation
  • Variable. Print the value indicating if tessellation is enabled.
  • Command. Enable tessellation.
0 - disabled
1 - enabled (by default)

OpenGL

Operations on the OpenGL API.

NameDescriptionArguments
gl_render_renderer
  • Command. Print the information on the graphics card.
gl_render_vendor
  • Command. Print the manufacturer of the OpenGL driver.
gl_render_version
  • Command. Print the version of the OpenGL driver.
gl_render_shading_language
  • Command. Print the version of the OpenGL shading language.
gl_render_extensions
  • Command. Print OpenGL render extensions.
gl_render_use_arb_compute_shader
  • Variable. Print the value indicating if the GL_ARB_compute_shader extension is set.
  • Command. Set the GL_ARB_compute_shader extension.
0 - not set (by default)
1 - set
gl_render_use_arb_sample_shading
  • Variable. Print the value indicating if the GL_ARB_sample_shading extension is set.
  • Command. Set the GL_ARB_sample_shading extension.
0 - not set
1 - set (by default)
gl_render_use_arb_tessellation_shader
  • Variable. Print the value indicating if the GL_ARB_tessellation_shader extension is set.
  • Command. Set the GL_ARB_tessellation_shader extension.
0 - not set
1 - set (by default)
gl_render_skip_errors
  • Variable. Print the value indicating if OpenGL errors are skipped.
  • Command. Skip OpenGL errors.
0 - checked (by default)
1 - skipped

OpenAL Settings

Operations on the OpenAL API.

NameDescriptionArguments
al_sound_renderer
  • Command. Print the information on the sound card.
al_sound_vendor
  • Command. Print the manufacturer of the OpenAL driver.
al_sound_version
  • Command. Print the version of the OpenAL driver.
al_sound_extensions
  • Command. Print the available OpenAL sound extensions.
alc_sound_extensions
  • Command. Print OpenAL context sound extensions.
al_sound_skip_errors
  • Variable. Print the value indicating if OpenAL errors are skipped.
  • Command. Skip OpenAL errors.
0 - checked (by default)
1 - skipped

Screenshots

Operations on the screenshot.

NameDescriptionArguments
video_extension
  • Variable. Print the current screenshot format.
  • Command. Set a screenshot format.
0 - TGA (by default)
1 - DDS
2 - PNG
3 - JPG
video_grab
  • Command. Take a screenshot.
    Notice
    A screenshot is saved in the bin/screenshots directory by default. You can specify another directory.
A path to the folder the screenshots will be saved in (optional)

General Information

Memory Info

Operations, representing information on the system memory.

NameDescription
memory_dump
  • Command. Print information on the memory dump in form of the fragmentation map.
memory_info
  • Command. Print information on the memory usage:
    1. Heap usage - size of the heap memory
    2. Memory usage - size of the used system memory
    3. Allocations - number of allocations
memory_save
  • Command. Dump memory pools (useful for offline analysis).

CPU Info

Operations, representing information on the CPU.

NameDescription
cpu_info
  • Command. Print an information on the CPU and instruction sets supported by it.
cpu_frequency
  • Command. Print the CPU frequency in MHz.
cpu_count
  • Command. Print the number of available CPUs.

System Info

Operations, representing information on the system.

NameDescription
binary_info
  • Command. Print an information on the engine binary.
system_info
  • Command. Print an information on the operating system and the engine build version.
system_memory
  • Command. Print the system memory size in Mbytes.

GPU Info

Operations, representing information on the GPU.

NameDescription
gpu_info
  • Command. Print the video card and driver versions.
gpu_memory
  • Command. Print the video memory size in Mbytes.
gpu_count
  • Command. Print the number of available GPUs.
Last update: 2017-07-03
Build: ()