Bool
Last updated
Last updated
You can use a Boolean cast node to convert a Boolean value to a float, an integer, or a string. In each case you can choose how the Boolean true or false value is represented in the target type.
For example, the default outputs for the Bool To String node are "true" and "false", but you could change them to "on" and "off", or "open" and "closed", or any other pair of strings.
Inputs:
Input
Boolean
The value to be converted.
True Value
<varies> [editable]
The value to output if the input is true.
False Value
<varies> [editable]
The value to output if the input is false.
Outputs:
Output
<varies>
The converted value. The output depends on the chosen node, and is either a float, an integer, or a string.
Perform Boolean logic operations on the provided inputs. All inputs and outputs are Boolean values.
Bool And
Output is true
if both A and B are true
.
Bool Or
Output is true
if either A or B are true
.
If you need a node that's equivalent to a Not logical operation, see Invert Bool.
Outputs true
in the frame where the input value changes from true
to false
or from false
to true
.
Inputs:
Input
Boolean
The Boolean value to monitor.
Outputs:
Output
Boolean
True when the Input
changes, but resets to false at the end of the frame.
In the following example, the referenced float is incremented by one each time that the referenced Boolean changes.
Outputs a true or false Boolean value. An AFX graph cannot change the value of this node.
You can open an AFX graph to change the value of this node in the Unity Editor.
Outputs:
Output
Boolean [editable]
A true or false value.
Converts a reference to a Boolean component to a Boolean value.
Inputs:
Bool Component
Bool Component
Reference to a Boolean component.
Outputs:
Bool Out
Boolean
The true or false value of the Boolean component.
Inverts a Boolean value. If the input is true
, the output is false
. If the input is false
, the output is true
.
Inputs:
Input
Boolean
The value to be inverted.
Outputs:
Output
Boolean
The inverted value of the Input
.
Sets the value of a Boolean component.
Inputs:
Enter
Flow
Flow to activate the node.
Bool Component
Boolean component
Reference to the Boolean component for which you want to set the value.
Value In
Boolean [editable]
The value that the Boolean component will be set to.
Outputs:
Exit
Flow
Continue the activating flow.
Output
Boolean
Repeats the Value In
value as an output.