Click or drag to resize

References Overview

AdvancedManual / Advanced / References OverviewBuilt-in C# Programming

References Overview

The support of reference values for properties is a fundamental feature of NeoAxis Engine. Technically, references allows you to get the property value of other properties, methods, scripts or other sources. References are allowed to link to objects inside the resource and link to other resources.

Contents
Example 1

Reference can point to an object. A typical example of reference usage is how mesh geometry points to the material.

Screenshot999999481 2.png
Example 2

Reference can point to a method. For example, it is used during scripting. A method returning a value is created. If some property reference this method, its value will be obtained from the method result.

Screenshot999999482 2.png

Script code:

Screenshot999999483.png
Example 3

Reference can point to a property of another object. In this case, the value of the property will duplicate the value of the referenced object's property. This allows to come up with many creative solutions. For example, one can create a shared property, which could be referenced by other objects. In this case, it would be enough to change the property in a single place, and the rest of the objects will be updated automatically.

Also, one can extract shared Property to a separate resource. One can think of it as a configuration file.

Screenshot999999485 2.png
See also
AdvancedBuilt-in C# Programming