This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
基础
专业(SIM)
UnigineEditor
界面概述
资源工作流程
版本控制
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
统一的Unigine着色器语言 UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Animations-Related Classes
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
VR-Related Classes
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
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
影片设定#

名称 描述 争论 默认值
-main_window_size Size of the main window主窗口大小 宽度 高度 1600 900
-main_window_resizable Allows changing the size of the main window on the fly, without having to restart the application允许即时更改窗口大小,而不必重新启动应用程序 0 is a non-resizable mode
1 is a resizable mode
0 对应于不可调整大小的模式
1对应于可调整大小的模式
0 0
-main_window_fullscreen Fullscreen mode of the main window主窗口的全屏模式 0 is a windowed mode
1 is a fullscreen mode
0 是窗口模式
1 是全屏模式
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
  • DirectX12
  • Vulkan
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
  • DirectX12
  • Vulkan
_ -video_app的当前值可以通过getVideoApp()Unigine API的方法。
"null"
"auto"
"direct3d11" or "dx"
"opengl" or "gl"
"direct3d12" or "dx12"
"vulkan" or "vk"
"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.启用或禁用调试上下文。

注意
Enabling the debug context may cause performance drop (~30-40%).启用调试上下文可能会导致性能下降(〜30-40%)。
  • 0 to disable.0 禁用。
  • 1 to write all errors (red) and warnings (yellow). If an error occurred, it means that there is a mistake in API.1 写入所有错误(红色)和警告(黄色)。如果发生错误,则表示API中存在错误。
  • 2 to write all errors (red) and warnings (yellow). If an error occurred, the engine will crash and the full callstack will be shown (with debug binaries only).2 写入所有DirectX错误(红色)和警告(黄色)。如果发生错误,引擎将崩溃并显示完整的调用堆栈(只使用调试二进制文件)
  • 3 (DirectX12/Vulkan only) the same as mode 2 but with GPU-assisted validation, which significantly affects performance.3 (仅适用于 DirectX12/Vulkan)与模式2相同,但使用GPU辅助验证,这将显著影响性能。
0
-video_debug_shader Enables or disables debug shaders for the application regardless of its binary type (debug or release). This option should be enabled in case you use graphics debugging tools (e.g., the RenderDoc debugger). 启用或禁用应用程序的调试着色器,无论其二进制类型如何(debugrelease)。 如果您使用图形调试工具(例如 RenderDoc 调试器),则应启用此选项。 0 to disable debug shaders (release shaders are used)
1 to enable debug shaders
0 禁用调试着色器(使用发布着色器)
1 启用调试着色器
0
-video_quad_buffer Enables or disables quad buffered stereo.启用 quad缓冲立体声 0 to disable quad buffering
1 to enable quad buffering
0 禁用四倍缓冲
1 启用四元缓冲
0
-video_offscreen Enables the offscreen mode for the application, making it possible to run UNIGINE Engine in a cloud and use powerful servers (e.g., to generate photorealistic datasets for deep learning and verification of AI algorithms). All windows in this mode are virtual, just like the display, user input is not available.为应用程序启用屏幕外模式,从而可以在云中运行 UNIGINE 引擎并使用强大的服务器(例如,为深度学习和 AI 算法验证生成逼真的数据集)。此模式下的所有窗口都是虚拟的,就像显示器一样,用户输入不可用。
-main_window Enables creating a main window during the application start-up. After starting up the application any window can be created and will work normally. For example, this can be useful in a custom editor or any other application, where there should be no main Engine window.允许在应用程序启动期间创建主窗口。 启动应用程序后,可以创建任何窗口并正常工作。 例如,这在自定义编辑器或任何其他不应该有主引擎窗口的应用程序中很有用。 1 to enable creating a main window.
0 to disable creating a main window.
1 启用创建主窗口。
0 禁用创建主窗口。
1
-auto_quit Enables force closing of the Engine when all windows are closed.在关闭所有窗口时启用强制关闭引擎。 1 to enable force closing of the Engine. This value should be set when 0 is passed to -main_window.
0 to disable force closing of the Engine.
1启用强制关闭引擎。当 0 传递给-main_window时,应设置此值。
0 禁用强制关闭引擎。
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
-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 Console command to be used at the engine start-up. Several commands can be separated using the && sequence.在引擎启动时使用的 控制台命令。可以使用&&序列分隔几个命令。 command <arguments>
-console_history

Sets the path to the file that stores the console command input history. The path to the file and its name should be specified.设置存储控制台命令输入历史的文件的路径。 应指定文件的路径及其名称。

If the path to the file is not specified, the file will be searched in directories the following sequence:如果未指定文件的路径,则会按以下顺序在目录中搜索文件:

  1. Directory set by the parameter -project_name (if specified)由参数-project_name设置的目录(如果指定)
  2. Directory where binary executable file is stored存放二进制可执行文件的目录
  3. Directory set by the parameter -data_path (if specified)由参数-data_path设置的目录(如果指定)

If the file name is also not specified, the file with the default name console_history will be searched in the above-mentioned order.如果文件名也未指定,则将按照上述顺序搜索默认名称为 console_history 的文件。

<path_to_file/console_history_file_name>

(the default is "bin/console_history")(默认情况下"bin/console_history")

-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_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.
加载插件库(相对于二进制可执行文件指定了路径)。
  • The library name should go without any prefixes and postfixes.
    (For example, libNetwork_x64d.so should be passed as "Network".)
    库名称应该没有任何前缀和后缀。
    (例如libNetwork_x64d.so应该作为"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
参数可以指定如下:
  • 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" .)
    您还可以使用以下语法: -extern_define "A=B,C=D"
    (例如-extern_define  "TEST=42" 。)
  • If you want to clear all definitions, simply pass "" as an argument to this command. 如果要清除所有定义,只需传递 ""作为此命令的参数即可。
注意
Affects UnigineScript only.该参数仅影响 UnigineScript。

The current value of -extern_define can be obtained via the getExternDefine() method of Unigine API.当前值-extern_define可以通过getExternDefine()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
参数可以指定如下:
  • DEFINITION_NAME
  • DEFINITION_NAME=VALUE
  • DEFINITION_NAME_1,DEFINITION_NAME_2,
    DEFINITION_NAME_3=VALUE,...,DEFINITION_NAME_N
-microprofile_enabled Enables the Microprofile tool.启用Microprofile工具。 1 to enable the Microprofile tool.
0 to disable the Microprofile tool.
1 启用 Microprofile 工具。
0 禁用 Microprofile 工具。

Sound Settings
声音设定#

名称 描述 争论 默认值
-sound_app Sound API to be used:
  • No soundNo sound
  • Automatically choose the best sound library option from available ones (OpenAL)Automatically choose the best sound library option from available ones (OpenAL)
  • OpenAL sound libraryOpenAL sound library
The current value of -sound_app can be obtained via the getSoundApp() method of Unigine API.No soundAutomatically choose the best sound library option from available ones (OpenAL)OpenAL sound library
使用的声音API:
  • No sound没有声音
  • Automatically choose the best sound library option from available ones (OpenAL)从可用的库中自动选择最佳的声音库选项(OpenAL)
  • OpenAL sound library OpenAL声音库
当前值-sound_app可以通过getSoundApp()Unigine API的方法选择。
null
auto
openal
auto
-vr_app

VR to be used:使用的VR:

  • No VR没有VR
  • Automatically choose OpenVR自动选择OpenVR
  • OpenVR
  • Varjo

The current value of -vr_app can be obtained via the getApiName() method of UNIGINE API.当前值 -vr_app 可以通过 getApiName()Unigine API的方法选择。

null
auto
openvr
varjo
null
最新更新: 2024-04-19
Build: ()