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 allow to get property value from some other property or another source.

Contents
Example 1

Reference can point to an object. A typical example of references usage is how mesh geometry points to 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 will reference this method, its value will be obtained from 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 shared property, which could be referenced by other objects. In this case it would be enough to change property in a single place, and the rest of the objects will be updated automatically.

Screenshot999999485 2.png

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

See also
AdvancedBuilt-in C# Programming