This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
Animations-Related Classes
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
VR-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

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.

string Data#

The user string data associated with the world. this string is written directly into the data tag of the *.world file.

bool Enabled#

The 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).

bool IsLoaded#

The 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 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

true if the Player is an Editor player; otherwise, false.

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, Node[] exclude, Node.TYPE[] exclude_types ) #

Searches for all of the nodes intersected by the line traced from p0 to p1, ignoring the ones passed in the exclude list and except the ones of the types passed in the exclude_types 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 - Array of the nodes to exclude; all these nodes will be skipped while checking for intersection.
  • Node.TYPE[] exclude_types - Array of the node types to exclude; nodes of the specified types will be skipped while checking for intersection.

Return value

The first node found at the line; 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 instance.

Arguments

  • vec3 p0 - Line start point coordinates.
  • vec3 p1 - Line end point coordinates.
  • WorldIntersection intersection - WorldIntersection class instance containing the intersection information.

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 instance.

Arguments

  • vec3 p0 - Line start point coordinates.
  • vec3 p1 - Line end point coordinates.
  • WorldIntersectionNormal intersection - WorldIntersectionNormal class instance containing the intersection information.

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 instance.

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 class instance containing the intersection information.

Return value

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

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

Searches for all of the nodes intersecting the line, ignoring the ones passed in the exclude list and except the ones of the types passed in the exclude_types list. The node closest to the start point is returned. The intersection result will be presented as a WorldIntersection instance.

Arguments

  • vec3 p0 - Line start point coordinates.
  • vec3 p1 - Line end point coordinates.
  • Node[] exclude - Array of the nodes to exclude; all these nodes will be skipped while checking for intersection.
  • Node.TYPE[] exclude_types - Array of the node types to exclude; nodes of the specified types will be skipped while checking for intersection.
  • WorldIntersection intersection - WorldIntersection class instance containing the intersection information.

Return value

The first 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.

bool GetIntersection ( WorldBoundFrustum bs, Node[] OUT_nodes, bool use_handlers ) #

Finds all nodes intersected by the specified bound frustum and puts them to the specified output buffer. You can also get editor-only objects (node handlers) along with nodes, just set use_handlers to true.

Arguments

  • WorldBoundFrustum bs - Bounding frustum where intersection search is to be performed.
  • Node[] OUT_nodes - Output buffer to store the list of intersected nodes (if any).
    Notice
    This output buffer is to be filled by the Engine as a result of executing the method.
  • bool use_handlers - true to include editor-only objects (node handlers) in the list of intersected nodes; false - to ignore handlers.

Return value

true if intersected nodes are found; otherwise, false.
Last update: 19.04.2024
Build: ()