This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine::Editor Class

Unigine editor. This interface provides access to Unigine editor functions.

To use this class, include the UnigineEditor.h file.

Unigine::Editor Class

Members


virtual ~Editor ()

Virtual destructor.

static Editor * get ()

Returns a pointer to the editor.

Return value

Pointer to the editor.

virtual int isLoaded () const =0

Returns a value indicating if the editor is already loaded.

Return value

Returns 1 if the editor is loaded; otherwise, 0.

virtual void setPlayer (const PlayerPtr & player) const =0

Sets the player to be used in the editor. 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.

Arguments

  • const PlayerPtr & player - Editor player to set.

virtual PlayerPtr getPlayer () const =0

Returns the current player used in the editor.

Return value

Current editor player.

virtual int getNumNodes () const =0

Returns the number of editor nodes loaded from the *.world file or belonging to the node list of the editor.

Return value

Number of editor nodes.

virtual int findNode (const char * name) const =0

Searches an editor node by its name.

Arguments

  • const char * name - Name of the node.

Return value

Node index if the node is found; otherwise, -1.

virtual NodePtr getNode (int num) const =0

Returns the editor node by its index in the list of editor nodes.

Arguments

  • int num - Node index.

Return value

Editor node.

virtual NodePtr getNodeByName (const char * name) const =0

Returns the editor node by its name.

Arguments

  • const char * name - Name of the node.

Return value

Editor node if it is in the list of editor nodes; otherwise, NULL (0).

virtual int isNode (const NodePtr & node) const =0

Checks if a given node belongs to the editor.

Arguments

  • const NodePtr & node - Node pointer.

Return value

Returns 1 if the node belongs to the editor; otherwise, 0.

virtual int addNode (const NodePtr & node) const =0

Appends a given node and its children to the editor.

Arguments

  • const NodePtr & node - Node pointer.

Return value

Returns 1 if the node is added successfully; otherwise,0.

virtual int removeNode (const NodePtr & node) const =0

Removes a given node from the editor.

Arguments

  • const NodePtr & node - Node pointer.

Return value

Returns 1 if the node is removed successfully; otherwise, 0.

virtual int releaseNode (const NodePtr & node) const =0

Releases a given node so it is not owned by the editor (made orphan).

Arguments

  • const NodePtr & node - Node pointer.

Return value

Returns 1 if the node is released successfully; otherwise, 0.
Last update: 2017-07-03
Build: ()