UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
Sandworm (Experimental)
使用编辑器工具执行特定任务
Extending Editor Functionality
编程
基本原理
搭建开发环境
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

项目开发

A project is an independent entity that contains all the data on your application content organized in a set of directories. The .project file containing metadata is associated with the project.项目是一个独立的实体,包含以一组目录组织的有关您的应用程序内容的所有数据。包含元数据的.project文件与项目关联。

注意
One project can consist of several worlds. So, there is no need to create a separate project for each world.一个项目可以包含多个世界。因此,无需为每个世界创建一个单独的项目。

Release and Development Builds发布和开发版本#

You can choose the Development or Release build of UNIGINE Engine:您可以选择UNIGINE Engine的DevelopmentRelease版本:

  • The Development build includes additional features that can be useful for project's development (Microprofile, etc.)Development构建包含可用于项目开发的其他功能(Microprofile等)
  • The Release build allows checking the final performance of the application.Release构建允许检查应用程序的最终性能。

Creating New Project创建新项目#

Before starting to create new projects you should have an SDK installed. Once you have the required version of the SDK, you can create a new project as follows:在开始创建新项目之前,您应该已经安装了 SDK 。拥有所需版本的SDK后,您可以按以下方式创建一个新项目:

  1. Open the Projects tab in the SDK browser.

    在SDK浏览器中打开Projects标签。

  2. Click Create New. The new project creation window will be opened.单击Create New。新的项目创建窗口将打开。
  3. Define the name of the project, choose a path to store project files, specify the SDK and UNIGINE Engine build to be used.

    The project will be created in the <project path>/<unigine_project> folder.The project will be created in the <project path>/<unigine_project> folder.

    The project will be created in the <project path>/<unigine_project> folder.
    定义项目的名称,选择存储项目文件的路径,指定要使用的SDK和UNIGINE Engine build

    The project will be created in the <project path>/<unigine_project> folder.该项目将在<project path>/<unigine_project>文件夹中创建。

  4. Specify the required application and general settings.指定所需的应用程序和常规设置
  5. Specify the add-ons to be added (optional).指定要添加的附件(可选)。
  6. Click Create New Project. The project will appear in the projects list.

    单击Create New Project。该项目将出现在项目列表中。

注意
You can change the project settings any time by clicking Other Actions -> Configure Project.您可以随时单击Other Actions -> Configure Project更改项目设置。

Application Settings应用程序设置#

The project can be created with the following application settings:可以使用以下应用程序设置创建项目:

Template A template that is used as a basis for the project:
  • Empty — no template is used for the project. Empty — no template is used for the project.
  • VR — a template is used to facilitate creation of a custom application for VR. VR — a template is used to facilitate creation of a custom application for VR.
  • IG — a template is used to facilitate creation of a custom Image Generator application. IG — a template is used to facilitate creation of a custom Image Generator application.
Empty — no template is used for the project. VR — a template is used to facilitate creation of a custom application for VR. IG — a template is used to facilitate creation of a custom Image Generator application.
用作项目基础的模板:
  • Empty — no template is used for the project.Empty-项目未使用模板。
  • VR — a template is used to facilitate creation of a custom application for VR.VR —模板用于促进为 VR 创建自定义应用程序。
  • IG — a template is used to facilitate creation of a custom Image Generator application.IG —模板用于简化自定义图片生成器应用程序的创建。
API+IDE Programming language to be used for project creation. The following APIs are available: UnigineScript only — UnigineScript will be used to implement the project. C++ — C++ API will be used to implement the project. For a project using a template, one of the following variants should be used depending on the OS: On Windows: C++ (Qt-based) — Qt Creator, QMake, or CMake is required for building the project.
注意
App* plugins (AppProjection, AppSurround, AppWall, AppPanorama, and others) cannot be used in Qt-based applications.App* plugins (AppProjection, AppSurround, AppWall, AppPanorama, and others) cannot be used in Qt-based applications.
App* plugins (AppProjection, AppSurround, AppWall, AppPanorama, and others) cannot be used in Qt-based applications.On Linux:
  • C++ GNU Make
C# (.Net Framework) — C# API will be used to implement the project. The Visual Studio will be used to compile a project.C# (.NET Core) — C# API and Component System will be used to implement the project. .NET Core is required for building the project.
用于项目创建的编程语言。 可以使用以下API:
Precision The coordinates precision to be used: Float — single precision Doubledouble precision使用的坐标精度:

General Settings通用设置#

The project can be created with the following general settings:可以使用以下常规设置创建项目:

GUI-based settings configurator Create a project with the launcher.使用启动器创建一个项目。

Click Plugins to specify the following:单击Plugins以指定以下内容:

Oculus support (AppOculus plugin) Create project with the Oculus Rift virtual display support.创建具有 Oculus Rift虚拟显示支持的项目。
HTC Vive support (AppVive plugin) Create project with the HTC Vive output support.创建具有 HTC Vive输出支持的项目。
Dual output stereo 3D (AppSeparate plugin) Output 2 separate images for each eye.
注意
The AppSeparate supports DirectX 11 only.The AppSeparate supports DirectX 11 only.
The AppSeparate supports DirectX 11 only.
每只眼睛输出 2张单独的图像
注意
The AppSeparate supports DirectX 11 only.AppSeparate仅支持 DirectX 11

3-monitor output (AppSurround plugin) Render the application across 3 monitors simultaneously.同时在 3个监视器上渲染应用程序
Monitor wall (AppWall plugin) Render the application into the configurable number of monitors.将应用程序渲染到可配置的监视器数量中。

Multi-projector setups (AppProjection plugin) Create a project with the AppProjection plugin. All necessary files are copied and the launcher with the corresponding settings is generated.使用AppProjection插件创建一个项目。复制所有必需的文件,并生成具有相应设置的启动器。
EasyBlend support (AppEasyBlend plugin) Create a project with the AppEasyBlend plugin.使用AppEasyBlend插件创建一个项目。

Syncker plugin Create a project with the Syncker plugin for multi-channel rendering synchronization.使用Syncker插件创建一个项目,以进行多通道渲染同步。
SSLSocket plugin Create a project with the SSLSocket plugin.使用 SSLSocket 插件创建一个项目。
Steam plugin Create a project with the plugin for Steam integration.使用用于Steam集成的插件创建一个项目。
VRPN Client plugin Create a project with the VRPN Client plugin.使用VRPN Client插件创建一个项目。
ARTTracker plugin Create a project with the ARTTracker plugin.使用 ARTTracker 插件创建一个项目。

Kinect2 Plugin Create a project with the Kinect2 plugin.使用 Kinect2 插件创建一个项目。
GPU Monitor plugin Enable GPU frequencies and temperature monitoring for your project.为您的项目启用 GPU频率和温度监控
Leap Motion plugin Tracking hands and fingers with Leap MotionLeap Motion跟踪手和手指
Interface plugin Create a project with the Interface plugin.使用Interface插件创建一个项目。

Add-Ons附加组件#

The project can be created including any add-on available in the Add-Ons tab. All required add-ons can be added both on and after project's creation.可以创建项目,包括Add-Ons选项卡中可用的任何加载项。所有必需的附件都可以在创建项目时或创建后添加。

Specifying Add-Ons on Project's Creation在创建项目时指定附加组件#

To create the project with an add-on:要创建带有附件的项目:

  1. Download the required add-on in the Add-Ons tab by clicking Install.

    注意
    Any amount of add-ons could be added to a project afterwards.Any amount of add-ons could be added to a project afterwards.
    Any amount of add-ons could be added to a project afterwards.
    通过单击InstallAdd-Ons选项卡中下载所需的加载项。

    注意
    Any amount of add-ons could be added to a project afterwards.之后可以将任何数量的附加组件添加到项目中。
  2. On the project creation, specify the add-ons to be included by clicking the Add-ons (0) button.

    在项目创建上,通过单击Add-ons (0)按钮指定要包含的加载项。

  3. Drop the required add-ons from the Available field to In Use. You can add any amount of add-ons to the project. After all add-ons are dropped, click Ok.

    注意
    If you haven't downloaded the add-on, click Manage installed add-ons. You will be redirected to the page with available add-ons.If you haven't downloaded the add-on, click Manage installed add-ons. You will be redirected to the page with available add-ons.
    If you haven't downloaded the add-on, click Manage installed add-ons. You will be redirected to the page with available add-ons.
    将所需的附件从Available字段拖放到In Use。您可以向项目添加任意数量的附件。删除所有加载项后,单击Ok

    注意
    If you haven't downloaded the add-on, click Manage installed add-ons. You will be redirected to the page with available add-ons.如果尚未下载加载项,请单击Manage installed add-ons。您将被重定向到具有可用加载项的页面。
  4. Click Create New Project. To enable added add-ons in the project, you should follow instructions on each add-on.单击Create New Project。要在项目中启用添加的附件,应遵循每个附件上的指示

Specifying Add-Ons for Existing Project指定现有项目的附件#

To extend an existing project with add-ons:要使用附件扩展现有项目:

  1. Download the required add-on in the Add-Ons tab by clicking Install.

    注意
    Any amount of add-ons could be added to a project afterwards.Any amount of add-ons could be added to a project afterwards.
    Any amount of add-ons could be added to a project afterwards.
    通过单击InstallAdd-Ons选项卡中下载所需的加载项。

    注意
    Any amount of add-ons could be added to a project afterwards.之后可以将任何数量的附加组件添加到项目中。
  2. Click Other Actions -> Configure Project.
    单击Other Actions -> Configure Project
  3. Click the Add-ons (0) button and drag and drop the required add-ons from the Available field to In Use.

    注意
    If you haven't downloaded the add-on, click Manage installed add-ons. You will be redirected to the page with available add-ons.If you haven't downloaded the add-on, click Manage installed add-ons. You will be redirected to the page with available add-ons.
    If you haven't downloaded the add-on, click Manage installed add-ons. You will be redirected to the page with available add-ons.
    单击Add-ons (0)按钮,然后将所需的附件从Available字段拖放到In Use

    注意
    If you haven't downloaded the add-on, click Manage installed add-ons. You will be redirected to the page with available add-ons.如果尚未下载加载项,请单击Manage installed add-ons。您将被重定向到具有可用加载项的页面。
  4. Click Ok and then click Update Configuration.单击Ok,然后单击Update Configuration

Adding Existing Project添加现有项目#

To add an existing project to the browser:要将现有项目添加到浏览器:

  1. Click Add Existing in the Projects tab.
    单击Projects选项卡中的Add Existing
  2. In the file dialog window that opens, specify the path to the project folder and click Apply. The project will appear in the projects list.
    在打开的文件对话框窗口中,指定项目文件夹的路径,然后单击Apply。该项目将出现在项目列表中。
注意
If the added project was created in the SDK of a previous version, it will be marked with the Upgrade available label.如果添加的项目是在以前版本的SDK中创建的,则它将标有Upgrade available标签。

Upgrading Existing Project升级现有项目#

Projects that require upgrade are marked with the Upgrade available label: 需要升级的项目带有Upgrade available标签:

To upgrade your project to the newest installed version of UNIGINE SDK:要将项目升级到UNIGINE SDK的最新安装版本:

  1. Click this label or Other Actions -> Configure Project. The following form will open:
    单击此标签或Other Actions -> Configure Project。将打开以下格式:
  2. Choose the newest installed version of the SDK and click Update Configuration.
    选择最新安装的SDK版本,然后单击Update Configuration
  3. Specify a path to the backup folder into which the original project will be copied. Leave Migrate Content checked and click Upgrade Project.
    指定将原始项目复制到的备份文件夹的路径。选中Migrate Content,然后单击Upgrade Project

The project will be upgraded automatically. You can also manually upgrade the project by running the upgrade script. In both cases, the same script will be used.该项目将自动升级。您还可以通过运行升级脚本手动升级项目。在这两种情况下,将使用相同的脚本。

注意
The source code should be upgraded manually by using the Migration Guide.应该使用 迁移指南 手动升级源代码。

Running Project with Default Settings使用默认设置运行项目#

There are several options of running a project with default settings:有一些使用默认设置运行项目的选项:

  • Run the project without the loaded editor by clicking Run.
    单击Run,在没有加载的编辑器的情况下运行项目。
  • Run the project with the loaded editor by clicking Open Editor.
    单击Open Editor,使用加载的编辑器运行项目。
注意
Clicking Open Editor will only launch the Editor, you will have to load the world manually: via the console, via the File -> Open World in the Menu Bar of the UnigineEditor, or by double-clicking the *.world file in the Asset Browser.点击Open Editor仅会启动编辑器,您将必须手动加载世界:通过控制台,通过UnigineEditor菜单栏中的File -> Open World, 或在Asset Browser中双击*.world文件。

You can also use launchers created by default in the project folder:您还可以使用在项目文件夹中默认创建的启动器

  • launch_debug — the launcher of the project's debug version. launch_debug —项目的调试版本的启动器。
  • launch_editor — the launcher of the project's with the loaded editor. launch_editor-使用已加载的编辑器启动项目的启动器。
  • launch_release — the launcher of the project's release version. launch_release-项目发行版本的启动器。
  • launcher — the startup file for the launcher that provides a GUI to configure application options and run the application. This launcher can be customized and used in the release version of your project. To create a project with the launcher, check the GUI-based settings configurator box in the project's creation window. launcher —启动程序的启动文件,提供了GUI来配置应用程序选项和运行应用程序。可以自定义启动器,并在项目的发行版中使用。要使用启动器创建项目,请在项目的创建窗口中选中 基于GUI的设置配置器 框。

Running Project with Custom Settings使用自定义设置运行项目#

There are also several options of running project with custom settings:使用自定义设置来运行项目还有几种选择:

注意
Clicking Open Editor will only launch the Editor, you will have to load the world manually via the console or via the File -> Open World in the main menu of the UnigineEditor.单击Open Editor仅会启动编辑器,您将必须通过控制台或通过UnigineEditor菜单栏中的File -> Open World

Customize Run Options自定义运行选项#

Via this form, the project without the loaded editor can be run with the custom settings.通过此表单,可以使用自定义设置来运行没有加载编辑器的项目。

Depending on the value of the Application option, different sets of options are available:根据Application选项的值,可以使用不同的选项集:

  • Default — the default main application (<project_name>_x*.exe) will be run:

    The default main application should be used when only UnigineScript is used to implement the project. In this case, the following options can be customized:The default main application should be used when only UnigineScript is used to implement the project. In this case, the following options can be customized:

    Debug Indicates whether debug or release version of the application should be run.Indicates whether debug or release version of the application should be run.
    Microprofile Enabled Run the application with the Microprofile tool enabled.Run the application with the Microprofile tool enabled.
    Arguments Start-up command-line options. Start-up command-line options.
    Remember Indicates whether to remember the specified custom settings for future run or not.Indicates whether to remember the specified custom settings for future run or not.
    The default main application should be used when only UnigineScript is used to implement the project. In this case, the following options can be customized:Indicates whether debug or release version of the application should be run.Run the application with the Microprofile tool enabled. Start-up command-line options.Indicates whether to remember the specified custom settings for future run or not.
    Default —将运行默认的主应用程序(<project_name>_x*.exe):

    The default main application should be used when only UnigineScript is used to implement the project. In this case, the following options can be customized:当仅使用 UnigineScript 实施项目时,应使用默认的主应用程序。在这种情况下,可以自定义以下选项:

    Debug Indicates whether debug or release version of the application should be run.指示应运行应用程序的调试版本还是发行版。
    Microprofile Enabled Run the application with the Microprofile tool enabled.启用 Microprofile 工具运行该应用程序。
    Arguments Start-up command-line options.启动命令行选项
    Remember Indicates whether to remember the specified custom settings for future run or not.指示是否记住指定的自定义设置以供将来运行。
  • Custom — a custom main application will be run:

    This option should be chosen if the C++ or C# API is used to implement the project (besides UnigineScript). In this case, the following options can be customized:This option should be chosen if the C++ or C# API is used to implement the project (besides UnigineScript). In this case, the following options can be customized:

    Binary Name of the custom main application. Here the name of the compiled binary executable located in the bin folder of the project should be specified. If the binary executable is located outside this folder, a path to it relative to the bin folder should be specified.Name of the custom main application. Here the name of the compiled binary executable located in the bin folder of the project should be specified. If the binary executable is located outside this folder, a path to it relative to the bin folder should be specified.
    Arguments Start-up command-line options. Start-up command-line options.
    Remember Indicates whether to remember the specified custom settings for future run or not.Indicates whether to remember the specified custom settings for future run or not.
    This option should be chosen if the C++ or C# API is used to implement the project (besides UnigineScript). In this case, the following options can be customized:Name of the custom main application. Here the name of the compiled binary executable located in the bin folder of the project should be specified. If the binary executable is located outside this folder, a path to it relative to the bin folder should be specified. Start-up command-line options.Indicates whether to remember the specified custom settings for future run or not.
    Custom —将运行自定义的主应用程序:

    This option should be chosen if the C++ or C# API is used to implement the project (besides UnigineScript). In this case, the following options can be customized:如果使用C++ or C# API实施项目(除UnigineScript外),则应选择此选项。在这种情况下,可以自定义以下选项:

    Binary Name of the custom main application. Here the name of the compiled binary executable located in the bin folder of the project should be specified. If the binary executable is located outside this folder, a path to it relative to the bin folder should be specified.定制主应用程序的名称。在这里,应指定位于项目bin文件夹中的已编译二进制可执行文件的名称。如果二进制可执行文件位于此文件夹之外,则应指定相对于bin文件夹的二进制路径。
    Arguments Start-up command-line options.启动命令行选项
    Remember Indicates whether to remember the specified custom settings for future run or not.指示是否记住指定的自定义设置以供将来运行。

Customize UnigineEditor Options自定义UnigineEditor选项#

Additional arguments Start-up command-line options.启动命令行选项
Debug The editor version (debug or release) that will be used for project's editing.将用于项目编辑的编辑器版本(调试或发行版)。
Remember Indicates whether to remember the specified custom settings for a future run or not.指示是否记住指定的自定义设置以备将来运行。

Editing Project编辑项目#

To open the project for editing:要打开项目进行编辑:

  • On Windows, click Open Code IDE:

    The project will be opened for editing in an associated tool. To change a tool, click an ellipsis under Open Code IDE. By default, the following form will open:The project will be opened for editing in an associated tool. To change a tool, click an ellipsis under Open Code IDE. By default, the following form will open:

    Choose Custom in the drop-down list and specify a path to a custom tool (e.g. IDE or editor) with required arguments:Choose Custom in the drop-down list and specify a path to a custom tool (e.g. IDE or editor) with required arguments:

    The project will be opened for editing in an associated tool. To change a tool, click an ellipsis under Open Code IDE. By default, the following form will open:Choose Custom in the drop-down list and specify a path to a custom tool (e.g. IDE or editor) with required arguments:
    在Windows上,单击Open Code IDE

    The project will be opened for editing in an associated tool. To change a tool, click an ellipsis under Open Code IDE. By default, the following form will open:将打开该项目,以便在关联的工具中进行编辑。要更改工具,请单击Open Code IDE下的省略号。默认情况下,将打开以下表单:

    Choose Custom in the drop-down list and specify a path to a custom tool (e.g. IDE or editor) with required arguments:在下拉列表中选择Custom,然后使用必需的参数指定自定义工具(例如IDE或编辑器)的路径:

  • On Linux, click Open folder and then edit code in an associated tool:
    在Linux上,单击Open folder,然后在关联的工具中编辑代码:

See Also也可以看看#

Other Actions其他行为#

When clicking the Other Actions button, the following form opens: 单击Other Actions按钮时,将打开以下表单:

Configure Project Change project settings.更改项目设置。
Open Folder Open the project folder.打开项目文件夹。
Delete Delete the project.删除项目。

Updating Project Configuration更新项目配置#

When clicking Other Actions -> Configure Project, the following form opens: 单击Other Actions -> Configure Project时,将打开以下表单:

Via this form, you can change settings of an existing project: the UNIGINE Engine build used for the project, the version of the release application, the coordinates precision, and the general settings. This option should also be used when you need to upgrade the existing project to the newest SDK version.通过此表单,您可以更改现有项目的设置:用于该项目的 UNIGINE Engine版本,发布应用程序的版本,坐标精度和常规设置。当您需要将现有项目升级到最新的SDK版本时,也应该使用此选项。

Moreover, you can restore the project's files that were corrupted, missed, or mistakenly modified. For this, you should leave settings in the form unchanged and press the Update Configuration button. In this case, the following files of the project will be restored (they will be copied from the SDK):此外,您可以还原已损坏,丢失或错误修改的项目文件。为此,您应保持表格形式的设置不变,然后按Update Configuration按钮。 在这种情况下,将还原项目的以下文件(它们将从SDK复制):

  • 二进制文件
  • core.ung, editor.ung and scripts.ung
  • 启动器
注意
If some of the files listed above are changed, the .modified postfix is added to names of such files. At that, the files from the SDK will also be copied.如果更改了上面列出的某些文件,则会将.modified后缀添加到此类文件的名称。届时,SDK中的文件也将被复制。
最新更新: 2020-11-17