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
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

NodeReference Class

A reference node is a node exported from Unigine engine into an external file with a .node extension, which stores all node-related information. Reference nodes automatically load the material library in which their material is stored. Unlike regular nodes, reference node are loaded into the world faster because of the internal cache usage.

Notice
A bounding box of the reference node is equal to the bounding box of its root node (child nodes are disregarded).

NodeReference Class

This class inherits from Node

Members


NodeReference (string name)

Constructor. Creates a new object that references a node from a given file.

Arguments

  • string name - Path to a *.node file.

string getNodeName ()

Returns the name of the currently referenced file.

Return value

Path to the referenced *.node file.

Node getNode ()

Returns the node stored by this reference.

Return value

Contained node.

Node releaseNode ()

Releases the internal node of ownership so it is no longer owned by the node reference (made orphan). After being released the node should be appended to one of the scripts not to cause a memory leak.

Return value

Root node of the internal hierarchy.

int setNodeName (string name)

Sets a reference to a new file.

Arguments

  • string name - Path to a *.node file.

Return value

1 if the new reference is set successfully; otherwise, 0.
Last update: 03.07.2017
Build: ()