What is A Reference or Binding?

Updated On: April 2, 2013

With all of the different components that can be added to an entity you need some way of tying all of those components together. That is where References / Bindings comes into play. The only way a reference can be utilized on a component is If it has a property of reference type. So this is a little limited by leaving it up to the developer of the component to include the necessary references that a component may need. Bindings will be a lot more flexible because you can dynamicly tell a component to keep a property equal to a certain value at all times.

Bindings can be achieved by using a Constrain Property action. It constrains the value of a property on a component to some dynamic value or a property. A binding will keep the value of a property equal to whatever it is bound to at all times during the execution of the game unless you add a condition that has to be met for the constraint to be active. When we say dynamic values that relates to using expressions.

Reference Parts / Syntax

A Reference is written in a certain syntax. If you want to refer to a component within the same entity then you put a "@" in front of the component name like such, "@Spatial". If you wan to reference a property on a component then you add a dot "." and then the property name like such, "@Spatial.rotation". In some cases the property on a component has sub properties so you just keep adding dots to drill down like such, "@Spatial.position.x". We know that you will not know which properties are available on a component so we provide the reference property browser which is coming in the next release.

Follow Us For Updates