Skip to content
Bit Quirky Behavior Trees and
State Machines

Search documentation

All topics and APIs

Close returns focus to Search.

What are you looking for?

Try a common topic or enter a complete API identifier.

Browse the reference instead

Esc closes · Tab reaches results · Enter opens the focused link

v0.11.0
Menu

Assembly: BitQuirky.Behavior.Runtime

Category: Node contracts

C#
class BitQuirky.Behavior.Nodes.State.ActionExecutionTokens

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:17-29

Stable source tokens for action-state list execution.

Responsibilities:

  • Name the deterministic ordered and same-advancement execution policies.

Does NOT:

  • Store authored values or schedule actions.

C#
public const string Parallel = "parallel"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:28

Same-advancement: every action in the group advances on each tick, and the first non-success cancels the rest of the range.

C#
public const string Sequence = "sequence"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:23

Ordered: the group advances one action at a time in authored order. The bake assumes this when no execution policy is authored.

Category: Node contracts

C#
class BitQuirky.Behavior.Nodes.State.ActionLifetimeTokens

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:40-51

Stable source tokens for action-state activation lifetime.

Responsibilities:

  • Name one-pass and repeating action-state behavior.

Does NOT:

  • Reset runtime state or evaluate transitions.

C#
public const string Once = "once"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:45

One pass: the Active Update holds its terminal result instead of starting again.

C#
public const string Repeat = "repeat"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:50

Repeating: the Active Update starts a new pass after each terminal result. The bake assumes this when no lifetime is authored.

Category: Node contracts

C#
class BitQuirky.Behavior.Nodes.State.ActionPhaseTokens

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:62-76

Stable source tokens for one action’s lifecycle group.

Responsibilities:

  • Name the Entry, Active Update, and Exit placements an action may author.

Does NOT:

  • Order actions, resolve omitted phases, or schedule lifecycle groups.

C#
public const string Enter = "enter"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:65

Entry group: evaluated once when the owning state activates.

C#
public const string Exit = "exit"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:75

Exit group: evaluated once after an outgoing transition latches and before the target state activates.

C#
public const string Update = "update"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:70

Active Update group: the state’s repeating work, and the placement the bake assumes for an action that authors no phase.

Category: Node contracts

C#
enum BitQuirky.Behavior.Nodes.State.StateCompletionMode

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:115-125

Underlying type: byte

What a state does after a terminal Active Update with no selected transition.

C#
Finish = 1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:121

Finish the state machine with the authored machine result.

C#
Return = 2

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:124

Return to the state activation suspended by the matching Push.

C#
Stay = 0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:118

Remain active; Once holds its result and Repeat starts a new pass.

Category: Node contracts

C#
enum BitQuirky.Behavior.Nodes.State.StateCompletionResult

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:128-141

Underlying type: byte

The explicit machine result produced by a finishing state.

C#
ActiveUpdate = 2

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:140

Finish with Success when the Active Update ended in Success, and with Failure for every other terminal result.

C#
Failure = 1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:134

Finish with Failure whatever the Active Update’s own terminal result was.

C#
Success = 0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:131

Finish with Success whatever the Active Update’s own terminal result was.

Category: Node contracts

C#
class BitQuirky.Behavior.Nodes.State.StateCompletionTokens

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:214-234

Canonical source values for state completion and explicit machine results.

C#
public const string ActiveUpdate = "active_update"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:233

Authoredfinish_resultvalue that mirrors the Active Update’s own terminal result, and the value the bake assumes when the parameter is absent.

C#
public const string Failure = "failure"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:228

Authored finish_result value finishing the machine with Failure.

C#
public const string Finish = "finish"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:222

Authored completion value selecting Finish.

C#
public const string Return = "return"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:224

Authored completion value selecting Return.

C#
public const string Stay = "stay"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:220

Authoredcompletion value selecting Stay, and the value the bake assumes when the parameter is absent.

C#
public const string Success = "success"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:226

Authored finish_result value finishing the machine with Success.

Category: Node contracts

C#
class BitQuirky.Behavior.Nodes.State.StateConstants

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:242-315

Constants for the Statechart Root and State node types. The statechart root contains one or more states; each state contains zero or one BT subgraph plus zero or more outgoing transitions (data-model.md §Layer 2 Node Type taxonomy).

C#
public const BitQuirky.Behavior.Baked.BakedNodeKind AnyStateKind = AnyState

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:276

Baked node kind the runtime dispatches on for the Any State pseudo-state.

C#
public const string AnyStateNodeKindToken = "any_state"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:260-261

Source:::any_statetoken for the pseudo-state whose outgoing transitions are evaluated from whichever state is active, ahead of that state’s own transitions.

C#
public const BitQuirky.Behavior.Baked.BakedNodeKind EntryStateKind = EntryState

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:274

Baked node kind the runtime dispatches on for the entry state.

C#
public const string EntryStateNodeKindToken = "entry"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:254-255

Source:::entrytoken for the state the machine activates on start; the bake requires exactly one entry state per machine.

C#
public const int MinActiveSecondsParameterId = -108903004

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:288

Stable baked id of the authored minimum-active-duration parameter, BehaviorNodeParameterTokens.MinActiveSeconds . A :::state node without one keeps a zero dwell budget and never gates its outgoing transitions, exactly as before the parameter existed. Registered only against State, never Entry.

C#
public const BitQuirky.Behavior.Baked.BakedNodeKind ReferenceKind = StateMachineReference

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:278

Baked node kind the runtime dispatches on for a referenced-machine state.

C#
public const string ReferenceNodeKindToken = "state_machine_reference"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:266-267

Source:::state_machine_referencetoken for a state that runs a separately authored machine in place of its own actions.

C#
public const BitQuirky.Behavior.Baked.BakedNodeKind RootKind = StatechartRoot

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:270

Baked node kind the runtime dispatches on for the statechart root.

C#
public const string RootNodeKindToken = "root"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:245-246

Source :::root token for the statechart root that owns the machine’s states.

C#
public const BitQuirky.Behavior.Baked.BakedNodeKind StateKind = State

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:272

Baked node kind the runtime dispatches on for an ordinary state.

C#
public const string StateNodeKindToken = "state"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:248-249

Source :::state token for one ordinary state of the machine.

Category: Node contracts

C#
enum BitQuirky.Behavior.Nodes.State.StateSelfReentry

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:105-112

Underlying type: byte

How an explicitly authored self-transition re-enters its active state.

C#
Restart = 0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:108

Run the normal bounded Exit/Entry handoff and restart state progress.

C#
Resume = 1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:111

Keep current state progress without running Exit or Entry.

Category: Node contracts

C#
enum BitQuirky.Behavior.Nodes.State.StateTransitionEvaluation

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:79-89

Underlying type: byte

When an outgoing state transition is eligible for evaluation.

C#
Continuous = 0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:82

Evaluate at each existing pre- and post-update transition boundary.

C#
OnFinish = 1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:85

Evaluate while a Once Active Update holds its terminal result.

C#
OnIteration = 2

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:88

Evaluate exactly once at each Active Update pass boundary.

Category: Node contracts

C#
enum BitQuirky.Behavior.Nodes.State.StateTransitionKind

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:175-182

Underlying type: byte

How a state transition treats the source activation.

C#
Push = 1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:181

Suspend the source without Exit and enter the target as a nested activation.

C#
Switch = 0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:178

Cancel the source and every suspended activation before entering the target.

Category: Node contracts

C#
class BitQuirky.Behavior.Nodes.State.StateTransitionKindTokens

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:195-211

Canonical source values for transition kind and return policy.

C#
public const string Push = "push"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:203

Authored kind value selecting Push.

C#
public const string Reenter = "reenter"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:210

Authored on_return value selecting Reenter.

C#
public const string Resume = "resume"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:208

Authoredon_return value selecting Resume, and the value the bake assumes when the parameter is absent.

C#
public const string Switch = "switch"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:201

Authoredkind value selecting Switch, and the value the bake assumes when the parameter is absent.

Category: Node contracts

C#
enum BitQuirky.Behavior.Nodes.State.StateTransitionOnReturn

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:185-192

Underlying type: byte

How a state resumes after the pushed activation returns.

C#
Reenter = 1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:191

Run Entry and begin a fresh Active Update activation.

C#
Resume = 0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:188

Continue the exact preserved activation without Entry.

Category: Node contracts

C#
enum BitQuirky.Behavior.Nodes.State.StateTransitionResultFilter

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:92-102

Underlying type: byte

Which terminal Active Update result permits a transition to fire.

C#
Any = 0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:95

Do not filter the transition by terminal result.

C#
Failure = 2

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:101

Permit only a failed terminal result.

C#
Success = 1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:98

Permit only a successful terminal result.

Category: Node contracts

C#
class BitQuirky.Behavior.Nodes.State.StateTransitionTokens

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:144-172

Canonical source values for transition cadence, result filtering, and re-entry.

C#
public const string AnyResult = "any"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:160

Authoredresult value selecting Any, and the value the bake assumes when the parameter is absent.

C#
public const string Continuous = "continuous"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:151

Authoredevaluatevalue selecting Continuous, and the value the bake assumes when the parameter is absent.

C#
public const string Failure = "failure"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:164

Authored result value selecting Failure.

C#
public const string OnFinish = "on_finish"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:153

Authored evaluate value selecting OnFinish.

C#
public const string OnIteration = "on_iteration"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:155

Authored evaluate value selecting OnIteration.

C#
public const string Restart = "restart"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:169

Authoredreentry value selecting Restart, and the value the bake assumes when the parameter is absent.

C#
public const string Resume = "resume"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:171

Authored reentry value selecting Resume.

C#
public const string Success = "success"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:162

Authored result value selecting Success.

Category: Node contracts

C#
struct BitQuirky.Behavior.Nodes.State.StatechartState

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:331-388

Authoritative baked lookup row for one statechart state.

Responsibilities:

  • Carry the state’s baked node identity and optional hosted behavior-tree root.
  • Own the effective Active Update lifetime independently of direct-action storage.
  • Address its contiguous authored outgoing-transition and direct-action row ranges.
  • Address its optional hosted-lifecycle row without graph-wide runtime scans.
  • Provide a Burst-friendly snapshot selected through the artifact’s node-to-state index.

Does NOT:

  • Hold per-follower state: that lives onBehaviorRuntimeInstance.
  • Own companion arrays or evaluate transitions and actions.

C#
public int ActionListCount

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:363

Number of contiguous direct-action lifecycle rows owned by this state.

C#
public int ActionListStart

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:360

First direct-action lifecycle row in the baked action-list table.

C#
public int BehaviorTreeRootIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:338

Index of the contained BT root inNodes, or -1 if the state has no behavior tree.

C#
public BitQuirky.Behavior.Nodes.State.StateCompletionMode Completion

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:384

Completion policy applied after terminal Active Update work.

C#
public BitQuirky.Behavior.Nodes.State.StateCompletionResult CompletionResult

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:387

Machine result selected when Completion is Finish.

C#
public int HostedBehaviorIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:369

Index of this state’s row in the hosted-behavior table, or -1 when it owns no hosted behavior tree.

C#
public bool IsEntry

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:351

True when this state is the entry state of the enclosing statechart (exactly one per source; bake enforces).

C#
public int MachineIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:375

Owning machine row in the artifact’s dense machine table.

C#
public int OutgoingTransitionCount

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:345

Number of outgoing transitions in the artifact’s transition table whoseSourceStateIndex equals this state’s node index.

C#
public int OutgoingTransitionStart

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:357

First authored outgoing transition in the baked transition table.

C#
public int StateMachineReferenceIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:372

Referenced-machine row, or -1 for an ordinary action state.

C#
public int StateNodeIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:354

Baked node index of the state represented by this row.

C#
public BitQuirky.Behavior.Baked.BakedActionLifetime UpdateLifetime

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/State/StatechartState.cs:381

Effective lifetime of the state’s selected Active Update source. Actionless states retain this policy without requiring a direct-action row.

Source fingerprint: sha256:29003d8b1658b98a79bebcd93e3b4030caf8511268b96817ab764d63df8d6c3b

Full-size image