m Yosh moved page Component:BooleanValueDriver`1 to Component:BooleanValueDriver: component names shouldn't have `1 |
Example added. |
||
Line 19: | Line 19: | ||
== Examples == | == Examples == | ||
One popular use of this component is to provide a way to control a blendshape that needs floats from a toggle that is typically a bool. The flexibility of this component also allows for both inverting a '1 when Off' type blendshape into 'on when true' bool, as well as when driving blendshapes that don't need to be driven to 1, for example if a blendshape controls the size of an ear and 0.5 is the 'on' it allows toggling between 0 and 0.5. | |||
== See Also == | == See Also == |
Latest revision as of 10:47, 15 October 2025

The BooleanValueDriver component drives the Field in TargetField
to the value specified in TrueValue
or FalseValue
based on State
.
Fields
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't. |
State
|
Bool | The state of this component. Chooses which value to use when driving TargetField
|
TargetField
|
field drive of T | The Field to drive |
FalseValue
|
T | The value that is used to drive TargetField when State is false.
|
TrueValue
|
T | The value that is used to drive TargetField when State is true.
|
Usage
TargetField
is the field to drive, and has the same type as specified during component creation. When State
is false, the field pointed to by TargetField
will take the value of FalseValue
. When it is true, the field will take the value of TrueValue
.
Examples
One popular use of this component is to provide a way to control a blendshape that needs floats from a toggle that is typically a bool. The flexibility of this component also allows for both inverting a '1 when Off' type blendshape into 'on when true' bool, as well as when driving blendshapes that don't need to be driven to 1, for example if a blendshape controls the size of an ear and 0.5 is the 'on' it allows toggling between 0 and 0.5.