Beginner: State Gate

The State Gate component is a powerful tool that can help you control parts of your definition. It works with a series of ‘State’ outputs that can turn parts of your definition on and off. This is especially useful when designing AR apps, as device states can be used live to enable or disable parts of your definition.

State Gate with components
The State Gate has both a True and False output by default. If a boolean toggle component is connected to it, the state of the toggle triggers the output. These outputs can be connected to other components to enable or disable them. In this example, if the toggle is set to False, a Mesh Box is enabled, and all other components connected to the State Gate’s outputs are disabled (in this case the Mesh Sphere component).

State Gate with Groups
To apply State Gate outputs to multiple components at once, you can group components together and connect the output arrow to the group. When the State is enabled the whole group will enable, and when it is disabled it will disbale all group components.

State Gate with Value Lists
The State Gate component output names can be customized to any string output. In this example, a Value List can be used as an input to the State Gate, and the outputs correspond to the strings stored within the Value List. This gives control over multiple outputs.

Example file:
This example file contains each of the above examples discussed.
1.20 State (9.7 KB)

1 Like