Skip to main content
Namespace: Molca.Sequence
File: Packages/com.molca.core/Runtime/Sequence/Step/BranchingStep.cs

Role

BranchingStep allows a sequence to take different paths based on runtime decisions. It holds an array of child Step objects (branchSteps[]). Call SetBranch(index) to activate exactly one branch and disable all others.

Inspector

  • branchDescription — text describing the branch options.
  • branchSteps — array of child Step references. Exactly one will be activated when a branch is chosen.

Code

SetBranch(index) validates the index and enables only the chosen branch step, disabling all others. The BranchingStep then completes.