This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
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
CIGI Client Plugin
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.

Notice
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 links to all materials and properties 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 Importing a New Node Asset

  1. Click the Import button in the Asset Browser window and choose the desired node in the file dialog window that opens.
  2. Place the node reference in the world.

You can repeat step 2 in order to add the required number of the node references. Or you can simply clone the added one: select the node reference and press Ctrl+D.

Several node references with the red material applied

By Converting an Existing Node

  1. Select a node in the World Hierarchy window (or directly in the scene).
  2. On the Menu bar, click Edit -> Convert to NodeReference (or press Ctrl+Shift+G).

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.

Notice
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 parameters of the Node tab you can change the asset of the source node or open the ReferenceNode Editor used to edit the source node:

A node asset

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 World Hierarchy window.
  2. Open the ReferenceNode Editor by clicking Edit in the Node tab of the Parameters window.

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

    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.

Deleting a Node Reference

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

Last update: 2018-04-26
Build: ()