This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
Sandworm (Experimental)
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine 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
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector 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

Node Reference is a node that refers to a .node file in the project directory, which is obtained by exporting a node from the world.

Notice
The world can contain several instances of Node Reference 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 made for the Node Reference via UnigineEditor are saved into this file.

Node Referencess should be used if a lot of identical objects are placed in the world. Using Node Reference enables to avoid manual editing each identical object if you need to make the same changes in all of them. You can simply add several Node References that point to one .node file and then edit only one Node Reference in order to update them all. Such approach enables to hold to integrity of instanced objects, especially if they are complex and sophisticated.

For example, the Node Reference 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#

  • The Instancing Nodes article to learn more about using Node References to create identical objects.
  • The NodeReference class to edit Node References via API
  • The Randomizer plugin to work with multiple Node References

Creating a Node Reference#

There are two ways to create a Node Reference via UnigineEditor:

  • Add a new Node Reference that refers to an external .node file. In this case, you should export a node into a .node file first.

    On the Menu bar, click Create -> Node -> Reference.

  • Convert a node with all its child nodes present 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.
    Warning
    Don't select a file directly from an FBX. Select the .node file asset that has been added into the world.
  2. Place the Node Reference in the world.

You can repeat Step 2 in order to add the required number of Node References. Or you can simply clone the added node: 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 Nodes 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 is 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 are 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#

In the Reference section 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

To edit the source node, to which the Node Reference points:

  1. Select the Node Reference in the World Nodes Hierarchy window.
  2. Click Edit in the Node tab of the Parameters window.

    The source node becomes available in the World Nodes Hierarchy window as a child of the Node Reference and can be edited via the Parameters window.

    World Nodes Hierarchy window: 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 red material applied
    Node References with the changed material
  4. After all changes are made, select the parent node in the World Nodes Hierarchy window and click Apply to save changes to the source node or Cancel changes to keep nodes unchanged.

    Reference section in the Node tab of the parent Node Reference

It is also possible to quick-replace the source node with another one stored in the same folder. To do that, select a Node Reference in the World Nodes Hierarchy window or the Viewport, hold Shift and use the mouse wheel or Page Up and Page Down buttons.

Deleting a Node Reference#

You can delete the Node Reference the same way as any other node.

Last update: 2020-11-24
Build: ()