Node Reference
Complete technical reference for the Branch on Boolean node
This page provides a complete technical reference for the Branch on Boolean node, including all properties, pins, and behavior details.
Node Overview
| Property | Value |
|---|---|
| Class Name | UK2Node_BranchOnBooleanState |
| Category | Flow Control > Boolean |
| Node Type | Latent (has execution pins) |
| Pure Node | No |
The Branch on Boolean node reads a boolean variable and branches execution based on its value. It combines the functionality of a Get node and a Branch node into a single, streamlined node.
Pins
Input Pins
| Pin | Type | Description |
|---|---|---|
| Execute | Exec | The execution input. Connect to an event or previous node's output execution pin. |
Output Pins
| Pin | Type | Description |
|---|---|---|
| True | Exec | Executes when the selected boolean variable evaluates to true. |
| False | Exec | Executes when the selected boolean variable evaluates to false. |
Unlike a Get + Branch combination, the Branch on Boolean node does not expose a data output pin for the boolean value. If you need the boolean value for other purposes, use a separate Get node.
Properties
Access these properties by selecting the node and viewing the Details Panel.
Variable Category
| Property | Type | Description |
|---|---|---|
| Variable Name | FName (Dropdown) | The boolean variable to evaluate. Displays all available boolean variables in the current Blueprint. |
Internal Properties
These properties are managed automatically and are not directly editable:
| Property | Description |
|---|---|
| Variable Reference | Internal reference to the variable, including its GUID for rename tracking. |
| Variable Source Class | The class that owns the variable (for inherited properties). |
| Is Self Context | Whether the variable belongs to the current Blueprint instance. |
| Is Local Variable | Whether the variable is a function-local variable. |
Compilation Behavior
During Blueprint compilation, the node expands into intermediate nodes:
Branch on Boolean Node
↓
[Expansion]
↓
┌───────────────────────┐
│ UK2Node_VariableGet │ (reads the boolean value)
│ ↓ │
│ UK2Node_IfThenElse │ (performs the branch)
└───────────────────────┘This expansion is transparent to the user but ensures the node compiles to the same bytecode as a manual Get + Branch combination.
Context Menu Options
Right-clicking the node provides these options:
| Option | Description |
|---|---|
| Break All Links | Disconnects all pins from the node. |
| Find References | Searches the Blueprint for other references to the selected variable. |
| Go to Definition | Navigates to the variable's definition in the Variables panel. |
Tooltip
Hovering over the node displays a tooltip with:
- The variable name being evaluated
- Description of the True/False execution paths
Example tooltip:
"Branches execution based on the value of bIsAlive. True executes the 'True' pin; False executes the 'False' pin."
Node Appearance
Title
The node title dynamically updates based on the selected variable:
- No variable selected: "Branch on Boolean"
- Variable selected: "Branch on [VariableName]" (e.g., "Branch on bIsAlive")
Title Color
The node uses a red title bar color (RGB: 0.85, 0.0, 0.0) to match the standard Branch node appearance.
Icon
Uses the same branch icon as the built-in Branch node (GraphEditor.Branch_16x).
Validation
The node performs validation during compilation:
| Validation | Error Message |
|---|---|
| No variable selected | "No variable specified" |
| Variable not found | "Variable '[name]' not found" |
| Boolean output pin missing | "Could not find boolean output pin" |
If a variable is deleted or renamed in a way that breaks the GUID reference, the node will show a compilation error. Fix by selecting a valid variable from the dropdown.
Event Handling
Post Placed New Node
When the node is first placed, it automatically selects the first available boolean variable if one exists.
Post Reconstruct Node
After node reconstruction (e.g., when opening a Blueprint), the node:
- Syncs the variable name from the stored GUID (handles renames)
- Refreshes the variable reference
Property Change
When the Variable Name property changes, the node:
- Clears the old variable reference
- Looks up the new variable by name
- Reconstructs the node to update the title
Performance
- Editor Performance: Negligible impact. Variable lookup is performed only when needed.
- Runtime Performance: Zero cost. The node compiles to the same bytecode as Get + Branch.
- Packaged Builds: Not included. The plugin is editor-only.
Integration Points
Blueprint Action Database
The node registers with the Blueprint Action Database, making it available in:
- Right-click context menu (on boolean Get nodes)
- Blueprint action search (search for "Branch on Boolean")
Menu Category
Located under: Flow Control > Boolean
Source Files
| File | Purpose |
|---|---|
K2Node_BranchOnBooleanState.h | Node class declaration |
K2Node_BranchOnBooleanState.cpp | Node implementation |
BooleanToBranchHandler.h/cpp | Context menu handler for conversion |
BranchingBooleanModule.cpp | Plugin module registration |