
In Flow Core, If-Else is not “writing a piece of if code.” It is a flow-control routing node. Its responsibility is very simple: it evaluates multiple condition groups in order, routes the flow chain to the first matching output, and if none of them match, execution goes to Else.
In the menu, it appears as the If-Else node. When first created, it includes the default ports In, True #0, and Else. Under the hood, it uses the FlowIfGroup data structure. Each group contains Enabled, Expanded, Comment, Condition Mode, and Conditions. ConditionMode supports:
At runtime, the editor-side If Groups are first compiled into FlowRuntimeIfGroup[], while Else Next is resolved separately. This means the core role of If-Else is not to “execute instructions,” but to compile condition groups into a set of target outputs.
During actual execution, ExecuteIfElseNode first handles the busy / gate logic, then evaluates each enabled group in order. Disabled groups are skipped immediately. The first group whose result evaluates to true returns its corresponding True Next. If no group passes, execution returns Else Next.
Key Points:
Order defines priority.
This is not a switchstyle selection. It follows a first match wins rule.
Group order is bound to output order. When a group is moved, its corresponding output port moves with it. When a group is deleted, the corresponding output port and its connections are also removed. When a group comment is changed, the output port name is updated as well.
Backward compatibility is supported. If an older asset contains only a single legacy Conditions block, the editor automatically migrates it into the first IfGroup.
Busy behavior
This is one detail that makes If-Else different from a normal Action node.
One implementation detail is worth noting: although the FlowIfGroup structure includes a Reject Result field, the If-Else UI does not expose it, and the If-Else runtime compiler does not use it. That field mainly exists for reuse in other contexts, such as Guard or BT.
The If-Else node summary displays Groups: X | Conditions: Y, which gives you a quick overview at a glance.