This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
Sandworm
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
创建内容
Content Optimization
Materials
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

启动命令行选项

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浏览器中设置,也可以通过命令行手动设置

注意
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 (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
010000 0
-video_height Screen height
Makes sense only if video_mode =-1
屏幕高度
#只有在 才有意义 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 对应于不可调整大小的模式
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:
  • No renderer: do not render anything onto the screen (for example, for servers in case of playing over the network)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 onesAutomatically choose the best option from available ones
  • DirectXDirectX
  • OpenGLOpenGL
The current value of -video_app can be obtained via the getVideoApp() method of Unigine API.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 onesDirectXOpenGL
用于渲染的图形API:
  • 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从可用选项中自动选择最佳选项。
  • DirectX DirectX
  • OpenGL OpenGL
_ -video_app的当前值可以通过getVideoApp()Unigine API的方法。
"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.
如果有多个GPU,则允许选择要使用的GPU。
注意
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%).
启用或禁用OpenGL或DirectX的调试上下文。
注意
Enabling the debug context may cause performance drop (~30-40%).启用调试上下文可能会导致性能下降(〜30-40%)。
DirectX:
  • 0 to disable0 to disable
  • 1 to write all DirectX errors (red) and warnings (yellow). If the error occurred, it means that there is a mistake in API.1 to write all DirectX errors (red) and warnings (yellow). If the error occurred, it means that there is a mistake in API.
  • 2 to write all DirectX errors (red) and warnings (yellow). If the error occurred, the engine will crash and the full callstack will be shown.2 to write all DirectX errors (red) and warnings (yellow). If the error occurred, the engine will crash and the full callstack will be shown.
OpenGL:
  • 0 to disable0 to disable
  • 1 to write all OpenGL errors (red) and warnings (yellow). If the error occurred, it means that there is a mistake in API.1 to write all OpenGL errors (red) and warnings (yellow). If the error occurred, it means that there is a mistake in API.
  • 2 works in the same way as 1 mode.2 works in the same way as 1 mode.
0 to disable1 to write all DirectX errors (red) and warnings (yellow). If the error occurred, it means that there is a mistake in API.2 to write all DirectX errors (red) and warnings (yellow). If the error occurred, the engine will crash and the full callstack will be shown.0 to disable1 to write all OpenGL errors (red) and warnings (yellow). If the error occurred, it means that there is a mistake in API.2 works in the same way as 1 mode.
DirectX:
  • 0 to disable 0 禁用
  • 1 to write all DirectX errors (red) and warnings (yellow). If the error occurred, it means that there is a mistake in API. 1 写入所有DirectX错误(红色)和警告(黄色)。如果发生错误,则表示API中存在错误。
  • 2 to write all DirectX errors (red) and warnings (yellow). If the error occurred, the engine will crash and the full callstack will be shown. 2 写入所有DirectX错误(红色)和警告(黄色)。如果发生错误,引擎将崩溃并显示完整的调用堆栈。
OpenGL:
  • 0 to disable 0 禁用
  • 1 to write all OpenGL errors (red) and warnings (yellow). If the error occurred, it means that there is a mistake in API. 1 写入所有OpenGL错误(红色)和警告(黄色)。如果发生错误,则表示API中存在错误。
  • 2 works in the same way as 1 mode. 2 的工作方式与 1 模式相同。
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:
  • ../RELATIVE_PATH/
  • ABSOLUTE_PATH
该参数可以按以下方式传递:
  • ../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() and getPluginPath(int num) methods.包含插件的目录的路径。此目录中的所有插件将在启动时自动加载。 可以相对于二进制可执行文件指定路径,也可以将其指定为绝对路径。 可以通过getPluginPath(int num)getPluginPath(int num)方法获取指定的-plugin_path目录的列表。 The arguments can be passed as follows:
  • ../RELATIVE_PATH/
  • ABSOLUTE_PATH
可以按以下方式传递参数:
  • ../RELATIVE_PATH/
  • ABSOLUTE_PATH
plugins/
注意
Unlike other command-line options, the plugin_path option can accumulate all specified values. It allows specifying multiple paths, each of which will be used by the Engine.与其他命令行选项不同,plugin_path选项可以累加所有指定的值。它允许指定多个路径,每个路径将由引擎使用。

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:
  • ../RELATIVE_PATH/
  • ABSOLUTE_PATH
可以按以下方式传递参数:
  • ../RELATIVE_PATH/
  • ABSOLUTE_PATH
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.For this parameter to take effect you should either delete existing system and editor cache files or move them to the new specified location.
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_cacheeditor_cache分别)。该路径可以指定为绝对路径,也可以相对于-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.为使该参数生效,您应该删除现有的系统 editor 缓存文件,或将其移动到新的指定位置。
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:
  • A name of the project directory. For example, -project_name my_project will create the following directory:

    Windows:Windows:

    C:/Users/<username>/my_project/

    Linux:Linux:

    /home/<username>/.my_project/

    Windows:Linux:
    A name of the project directory. For example, -project_name my_project will create the following directory:

    Windows:Windows:

    C:/Users/<username>/my_project/

    Linux:Linux:

    /home/<username>/.my_project/

  • 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.
    Windows:Linux:The specified unigine_projects folder must exist in the User profile.
    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.
A name of the project directory. For example, -project_name my_project will create the following directory:

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.
Windows:Linux:The specified unigine_projects folder must exist in the User profile.
PROJECT_NAME,即:
  • A name of the project directory. For example, -project_name my_project will create the following directory:

    Windows:Windows:

    C:/Users/<username>/my_project/

    Linux:Linux:

    /home/<username>/.my_project/

    Windows:Linux:
    项目目录的名称。例如, -project_name my_project 将创建以下目录:

    Windows: Windows

    C:/Users/<username>/my_project/

    Linux: Linux

    /home/<username>/.my_project/

  • 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.
    Windows:Linux:The specified unigine_projects folder must exist in the User profile.
    相对于用户配置文件的项目目录的路径。例如,-project_name unigine_projects/my_project将在以下目录中创建my_project目录:

    Windows: Windows

    C:/Users/<username>/unigine_projects/

    Linux: Linux

    /home/<username>/.unigine_projects/

    注意
    The specified unigine_projects folder must exist in the User profile.用户配置文件中必须存在指定的unigine_projects文件夹。
-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.
引擎将忽略guids.db文件,并在数据文件夹内的所有.meta文件以及所有已安装的外部目录和包中搜索GUID。
注意
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>
-extern_plugin 加载插件库(相对于二进制可执行文件指定了路径)。
  • 库名称应该没有任何前缀和后缀。
    (例如libNetwork_x64d.so应该作为"Network"传递。)
  • The library name should go without any prefixes and postfixes.
    (For example, libNetwork_x64d.so should be passed as "Network".)
    几个插件之间用逗号分隔(没有空格)。
  • Several plugins are comma separated (no whitespace).如果您要清除插件列表(在启动时指定了引擎,引擎会自动加载它们),只需传递 ""作为该命令的参数。
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_x64d.so should be passed as "Network".)
    The library name should go without any prefixes and postfixes.
    (For example, libNetwork_x64d.so should be passed as "Network".)
  • Several plugins are comma separated (no whitespace).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. 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 library name should go without any prefixes and postfixes.
(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.
参数可以指定如下:
  • PLUGIN_NAME
  • PLUGIN_NAME_1,PLUGIN_NAME_2,...,PLUGIN_NAME_N
-extern_define 要使用的外部定义。
  • 几个定义以逗号分隔(没有空格)。
  • Several definitions are comma separated (no whitespace).您还可以使用以下语法: -extern_define "A=B,C=D"
    (例如-extern_define  "TEST=42" 。)
  • You can also use the following syntax: -extern_define "A=B,C=D".
    (For example, -extern_define  "TEST=42" .)
    如果要清除所有定义,只需传递 ""作为此命令的参数即可。
当前值-extern_define可以通过getExternDefine()Unigine API的方法。
External definition to be used.
  • Several definitions are comma separated (no whitespace).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" .)
    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. 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 getExternDefine() method of Unigine API.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.
参数可以指定如下:
  • DEFINITION_NAME
  • DEFINITION_NAME=VALUE
  • DEFINITION_NAME_1,DEFINITION_NAME_2,
    DEFINITION_NAME_3=VALUE,...,DEFINITION_NAME_N

Sound Settings声音设定#

名称 描述 争论 默认值
-sound_app 使用的声音API:
  • No sound
  • No sound从可用的库中自动选择最佳的声音库选项(OpenAL)
  • Automatically choose the best sound library option from available ones (OpenAL) OpenAL声音库
当前值-sound_app可以通过getSoundApp()Unigine API的方法。
null
auto
openal
auto
最新更新: 2021-04-29
Build: ()