This page has been translated automatically.
Setting Up Development Environment
High-Level Systems
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
Double Precision Coordinates
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
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.

Node Reference

A node reference is a node that refers to an external .node file on the disk, which is obtained by exporting a node from the world.

The world can contain several instances of node references referring to the same .node file.
The .node file usually contains a pre-fabricated node (or a hierarchy of nodes) with all the material and property libraries that are required for its rendering. All changes that are made for the node reference via UnigineEditor are saved into this file.

The node references should be used if there are a lot of identical objects that are repeated in the world. Using the node references will enable to avoid manual editing each identical object if you need to make the same changes in all of such objects. You can simply add several node references that point to one .node file and then edit only one node reference in order to update all of them. Such approach enables to hold to integrity of the repeated objects, especially if they are complex and sophisticated.

For example, the node references can be used to add identical cars, boats or buildings that should be updated at once, if necessary.

Boats added as node references

See Also

Creating a Node Reference

There are 2 ways to create a node reference via UnigineEditor:

  • Add a new node reference that refers to an external .node file. In this case, you will need to export a node into a .node file first.
  • Convert a node with all its child nodes presented in the nodes hierarchy list into a node reference. In this case, the source node will change its type to a node reference.

By Adding a New Node Reference

  1. Export a node from the world.
    Before exporting a node into .node file to be used as node reference, you may need to reset the node position to zero, because it is saved relative to the zero of coordinates.
  2. Click Import -> Node File Reference and choose the exported node in the file dialog window that opens.

  3. Position the node reference in the world.

You can repeat steps 2 and 3 in order to add the required number of the node references. Or you can simply clone the added one: select the node reference, press Ctrl+D and click Yes in the dialog window that opens.

Several node references with the red material applied

By Converting an Existing Node

  1. Select a node in the nodes hierarchy list of the Nodes panel (or directly in the scene).
  2. On the Menu bar, click Edit -> Convert to NodeReference (or press Ctrl+Shift+G).

  3. Specify a name for the .node file to which the node reference will refer and click Ok.

As a result, the source node will be converted into the node reference:

Source Node to be Converted
Converted Node

You can also clone the converted node in order to get the required number of node references.

If you select several nodes and convert them into a node reference, they will be saved into a .node file as child nodes of a dummy node.
Source Nodes to be Converted
Nodes Grouped Under a Dummy Node to Which Node Reference Refers

Editing a Node Reference

On the Reference tab of the Nodes panel you can change the path to the source node or open the ReferenceNode Editor used to edit the source node:

A Path to the Source Node

Reference Editor

UnigineEditor features a special ReferenceNode Editor, which enables to edit the source node to which the node reference is pointed. To edit the source node:

  1. Select the node reference in the Nodes panel.
  2. Open the ReferenceNode Editor by clicking Edit on the Reference tab.

    The editor will appear in the lower right corner of the application window and the source node will become available in the nodes hierarchy:

    ReferenceNode Editor

    Source node in the edit mode
  3. Edit the source node. For example, you can change the material applied to it:
    Node references with the yellow material applied
    Node references with the changed material
  4. Click Apply to save changes made to the source node or Cancel changes to cancel them. As a result, the list of the scene nodes will appear again in the Nodes panel.

Deleting a Node Reference

You can delete the node reference the same way as any other node.

Last update: 2017-07-03
Build: ()