Skip to content

SwitchMaterialDriver

Class Documentation

Edit documentation

A vector driver that returns the value of the first element whose condition is true. Each element of mElements is a SwitchMaterialDriverElement that pairs a bool driver mCondition with a driver mValue. The driver returns the mValue of the first element in list order whose mCondition is true. When no condition is true, it returns mDefaultValue.

A value can be a driver of any kind. A float value fills all four components, so a switch over float values works as a float switch.

Properties

mDefaultValue

Pointer<ILogicDriver> = null
Edit documentation

The result when no element's mCondition is true. It is evaluated on every call, also when an element is chosen.