This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
Sandworm (Experimental)
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
Light Sources
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
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
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine.Editor Class

This class provides functionality for the editor script that loads and manages the hierarchy of nodes displayed in the editor.

Notice
C++ methods running editor script functions are described in the Engine class reference.

See Also#

  • C++ API sample located in the folder <UnigineSDK>/source/samples/Api/Systems/Editor
  • C# API sample located in the folder <UnigineSDK>/source/csharp/samples/Api/Systems/Editor

Editor Class

Properties

Player Player#

The current player used in the editor.
set
Sets the current player to be used in the Editor mode.
Notice
Editor player is handled differently than in-game players. Parameters set directly for the player are ignored; instead, Editor player uses Camera parameters set via the interface. (See Editor scripts in data/core/editor folder for implementation.)
set value - Player to set as current.

string Data#

User string data associated with the world. this string is written directly into the data tag of the *.world file.
set
Sets user data associated with the world. In the *.world file, the data is set in the data tag.
set value - User data to be set. Data can contain an XML formatted string.

bool Enabled#

A value of the Enabled parameter. The Enabled parameter controls all internal additional engine processing (for example, reloading of textures when their recording time is changed and so on). For example, the Enabled parameter can be set to 0 when using Syncker in order to increase engine performance (as Syncker operates inside the editor environment and can reduce engine performance).
set
Enable or disable the editor.
set value - 1 to set the Enabled parameter; otherwise, 0.

bool IsLoaded#

A value indicating if the editor is already loaded.

Members


void Load ( string script = "editor/editor.usc" ) #

Loads the editor from the specified script.

Arguments

  • string script - Path to the script.

void Quit ( ) #

Quit the editor.

void VideoRestart ( ) #

Restarts the video application to apply changes to video settings, if any.

void Reload ( ) #

Reloads the Unigine Editor. This functions updates node hierarchy, updates loaded textures if they were modified, etc.

int NeedReload ( ) #

Returns a value indicating if Unigine Editor should be reloaded.

Return value

1 if the editor should be reloaded; otherwise, 0.

void AddEditorPlayer ( Player player ) #

Adds another editor player.

Arguments

  • Player player - Player instance.

void RemoveEditorPlayer ( Player player ) #

Removes a given player from the editor.

Arguments

  • Player player - Player instance.

bool IsEditorPlayer ( Player player ) #

Returns a value indicating if the given player is an Editor player.

Arguments

  • Player player - Player instance.

Return value

1 if the Player is an Editor player; otherwise, 0.

Node GetIntersection ( vec3 p0, vec3 p1 ) #

Searches for all of the nodes intersected by the line traced from p0 to p1. The node closest to the start point is returned.

Arguments

  • vec3 p0 - Line start point coordinates
  • vec3 p1 - Line end point coordinates

Return value

The first intersected node found at the line; null if there was no intersection.

Node GetIntersection ( vec3 p0, vec3 p1, Node[] exclude ) #

Searches for all of the nodes intersected by the line traced from p0 to p1, except for the ones passed in the exclude list. The node closest to the start point is returned.

Arguments

  • vec3 p0 - Line start point coordinates.
  • vec3 p1 - Line end point coordinates.
  • Node[] exclude - List of nodes to be ignored when searching for intersection by the traced line.

Return value

The first intersected node found at the line (except for the ones passed in the exclude list); null if there was no intersection.

Node GetIntersection ( vec3 p0, vec3 p1, WorldIntersection intersection ) #

Searches for all of the nodes intersecting the line. The node closest to the start point is returned. The intersection result will be presented as a WorldIntersection node.

Arguments

Return value

The first node found at the line; null if there was no intersection.

Node GetIntersection ( vec3 p0, vec3 p1, WorldIntersectionNormal intersection ) #

Searches for all of the nodes intersecting the line. The node closest to the start point is returned. The intersection result will be presented as a WorldIntersectionNormal node.

Arguments

Return value

The first node found at the line; null if there was no intersection.

Node GetIntersection ( vec3 p0, vec3 p1, WorldIntersectionTexCoord intersection ) #

Searches for all of the nodes intersecting the line. The node closest to the start point is returned. The intersection result will be presented as a WorldIntersectionTexCoord node.

Arguments

Return value

The first node found at the line; null if there was no intersection.

Node GetIntersection ( vec3 p0, vec3 p1, Node[] exclude, WorldIntersection intersection ) #

Searches for all of the nodes intersecting the line. The node closest to the start point is returned. The intersection result will be presented as a WorldIntersection node.

Arguments

  • vec3 p0 - Start point of the line.
  • vec3 p1 - End point of the line.
  • Node[] exclude - Array of the nodes to exclude; all these nodes will be skipped while checking for intersection.
  • WorldIntersection intersection - WorldIntersection node.

Return value

The first intersected node found at the line; null if there was no intersection.

Node GetIntersection ( vec3 p0, vec3 p1, Node[] exclude, WorldIntersectionNormal intersection ) #

Searches for all of the nodes intersecting the line. The node closest to the start point is returned. The intersection result will be presented as a WorldIntersectionNormal node.

Arguments

  • vec3 p0 - Start point of the line.
  • vec3 p1 - End point of the line.
  • Node[] exclude - Array of the nodes to exclude; all these nodes will be skipped while checking for intersection.
  • WorldIntersectionNormal intersection - WorldIntersectionNormal node.

Return value

The first node found at the line; null if there was no intersection.

Node GetIntersection ( vec3 p0, vec3 p1, Node[] exclude, WorldIntersectionTexCoord intersection ) #

Searches for all of the nodes intersecting the line. The node closest to the start point is returned. The intersection result will be presented as a WorldIntersectionTexCoord node.

Arguments

  • vec3 p0 - Start point of the line.
  • vec3 p1 - End point of the line.
  • Node[] exclude - Array of the nodes to exclude; all these nodes will be skipped while checking for intersection.
  • WorldIntersectionTexCoord intersection - WorldIntersectionTexCoord node.

Return value

The first intersected node found at the line; null if there was no intersection.
Last update: 2021-02-17
Build: ()