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.6.0
Menu

Assembly: BitQuirky.Behavior.Runtime

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.BehaviorActionLifecycleRuntimeState

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:266-338

Bounded lifecycle progress for one action state’s Entry, Active Update, and Exit groups.

Responsibilities:

  • Carry the selected lifecycle phase, the three structured group results, the Active Update pass identity, the latched destination, its transition update, and the single remaining Exit evaluation.
  • Stay plain data so GameObject and pure-entity hosts carry identical handoff evidence.

Does NOT:

  • Own per-action progress, baked policy, or native memory.

C#
public static BitQuirky.Behavior.Execution.BehaviorActionLifecycleRuntimeState Inactive { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:321-337

Gets a cleared lifecycle value using the documented inactive sentinels.

C#
public BitQuirky.Behavior.Diagnostics.BehaviorNodeExecutionStatus EntryStatus

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:273

Structured Entry group result.

C#
public byte ExitBudgetRemaining

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:306

One while a nonempty Exit still owes its sole evaluation.

C#
public BitQuirky.Behavior.Diagnostics.BehaviorNodeExecutionStatus ExitStatus

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:279

Structured Exit group result.

C#
public byte FinishArmed

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:288

One while an On Finish transition may observe a held Once result.

C#
public byte HasLatchedDestination

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:312

One while a destination is latched. Zero-initialized memory therefore reads as no handoff without depending on the -1 sentinels written by explicit clears.

C#
public byte IterationBoundaryPending

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:291

One only until the current pass boundary has had its On Iteration evaluation.

C#
public int LatchedDestinationStateIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:300

Chosen destination state, or -1 outside a handoff.

C#
public BitQuirky.Behavior.Execution.BehaviorResultCode PendingMachineFaultCode

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:297

Exact fault code retained when PendingMachineResult is Faulted.

C#
public BitQuirky.Behavior.Execution.BehaviorMachineResult PendingMachineResult

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:294

Final result waiting for the state’s bounded Exit update.

C#
public BitQuirky.Behavior.Baked.BakedActionPhase Phase

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:270

Lifecycle group the shared scheduler selected for the active state.

C#
public byte Reserved0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:315

Reserved byte kept zero for additive binary evolution.

C#
public byte Reserved1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:318

Reserved byte kept zero for additive binary evolution.

C#
public int TransitionFrame

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:303

Update that latched the destination, or -1 before handoff.

C#
public uint UpdatePass

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:282

One-based Active Update pass identity; zero before the first pass.

C#
public BitQuirky.Behavior.Execution.BehaviorResultCode UpdateResult

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:285

Exact result produced by the most recently completed Active Update pass.

C#
public BitQuirky.Behavior.Diagnostics.BehaviorNodeExecutionStatus UpdateStatus

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:276

Structured Active Update group result.

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.BehaviorActionRuntimeState

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:160-181

Persistent progress for one direct action in a baked state action list.

Responsibilities:

  • Retain one action’s result, pending command identity, and activation generation.
  • Allow any number of deferred Parallel actions without consuming fixed legacy slots.

Does NOT:

  • Own the baked action, interpret completion payloads, or allocate memory.

C#
public uint ActivationGeneration

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:180

State activation that issued the request, so a completion belonging to an earlier activation of the same action is discarded.

C#
public byte CancellationIssued

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:168

One once an interrupt command has been posted for the outstanding request, so no second cancellation is emitted.

C#
public int CommandId

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:172

Runtime-issued command id the outstanding request and its completion record are matched on.

C#
public int CompletedFrame

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:178

Host frame stamped by the completion, cancellation, or immediate result; zero while a freshly issued request is still outstanding.

C#
public int FrameIssued

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:176

Host frame on which the request was posted.

C#
public byte IsPending

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:166

One while the action awaits an external service completion identified by CommandId.

C#
public byte Reserved0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:170

Reserved byte kept zero for additive binary evolution.

C#
public BitQuirky.Behavior.Execution.BehaviorResultCode Result

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:164

Result this action last produced; None before its first evaluation and Running while a request is outstanding.

C#
public int ServiceId

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:174

Stable service-id hash of the service the outstanding request was posted to.

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.BehaviorInterruptionRecord

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:481-510

Latest structured reactive interruption recorded by one runtime instance.

Responsibilities:

  • Preserve interrupted and cause node identity, result, frame, and monotonic sequence.

Does NOT:

  • Invoke a callback, emit a cue, or replace the selected branch result.

C#
public int CauseNodeIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:488

Baked condition node that caused the interruption.

C#
public int FrameNumber

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:494

Selected frame in which the interruption occurred.

C#
public int InterruptedNodeIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:485

Baked node whose Running work was interrupted.

C#
public byte IsValid

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:500

One when this record contains an observed interruption.

C#
public byte Reserved0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:503

Reserved byte kept zero for additive binary evolution.

C#
public byte Reserved1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:506

Reserved byte kept zero for additive binary evolution.

C#
public byte Reserved2

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:509

Reserved byte kept zero for additive binary evolution.

C#
public BitQuirky.Behavior.Execution.BehaviorResultCode Result

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:491

Observable result recorded for the interrupted node.

C#
public uint Sequence

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:497

Per-agent monotonic interruption sequence.

Category: Low-level runtime

C#
enum BitQuirky.Behavior.Execution.BehaviorMachineResult

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:102-115

Underlying type: byte

Final result of a state machine. A running or deliberately staying machine reports None; faults are never collapsed into an authored Failure result.

C#
Failure = 2

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:111

The machine reached an authored failure terminal.

C#
Faulted = 3

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:114

The machine stopped on a runtime fault, never on an authored Failure outcome.

C#
None = 0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:105

The machine is still running or deliberately staying; it has no final result yet.

C#
Success = 1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:108

The machine reached an authored success terminal.

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.BehaviorMemberRequestSlot

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:416-442

The single per-agent request/response channel for one in-flight immediate member operation. Immediate member operations (methods, messages, property and field node reads and writes, and member conditions) resolve within one selected host tick through a bounded microstep rather than the command/completion path used for deferred coroutine and event operations. Behavior Tree leaves retain those commands in pending-external slots; direct lifecycle work retains them in its per-nodeBehaviorActionRuntimeState.

Responsibilities:

  • Carry which member operation and owning node the core requested, and the exact behavior result code the host wrote back after invoking the generated accessor.

Does NOT:

  • Track deferred coroutine or event operations, which use their owning host execution state rather than this immediate channel.

C#
public BitQuirky.Behavior.Execution.BehaviorResultCode CompletionCode

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:435

Exact behavior result the host wrote after servicing an immediate request.

C#
public int NodeIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:423

Owning baked node index of the requested operation; -1 when none.

C#
public int OperationIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:420

Baked member operation row the core requested; -1 when none.

C#
public byte Reserved0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:429

Reserved byte kept zero for additive binary evolution.

C#
public ushort Reserved1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:432

Reserved word kept zero for additive binary evolution.

C#
public byte Reserved2

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:438

Reserved byte kept zero for additive binary evolution.

C#
public ushort Reserved3

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:441

Reserved word kept zero for additive binary evolution.

C#
public BitQuirky.Behavior.Execution.BehaviorMemberRequestState State

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:426

Channel lifecycle state.

Category: Low-level runtime

C#
enum BitQuirky.Behavior.Execution.BehaviorMemberRequestState

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:388-398

Underlying type: byte

Lifecycle state of the single per-agent immediate member request channel.

C#
Completed = 2

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:397

The host serviced the request; the core consumes the exact completion code.

C#
None = 0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:391

No immediate member operation is outstanding.

C#
Requested = 1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:394

The shared core requested an immediate member operation the host must service.

Category: Low-level runtime

C#
enum BitQuirky.Behavior.Execution.BehaviorNestedMachinePhase

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:515-534

Underlying type: byte

Stable lifecycle phase of a referenced machine activation.

C#
Faulted = 5

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:533

The nested machine stopped on a runtime fault.

C#
Finished = 4

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:530

The nested machine reached its terminal; the reference reports Running until the host leaves it.

C#
None = 0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:518

No referenced machine is active on this instance.

C#
Parked = 1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:521

The reference is entered but no candidate was selectable, so nothing nested runs this tick.

C#
Running = 3

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:527

The selected candidate machine is executing.

C#
Selecting = 2

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:524

The reference is choosing which saved candidate to activate; no nested machine runs yet.

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.BehaviorReactiveConditionState

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1325-1330

Implements: IBufferElementData

Entity dynamic-buffer element mirroring one shared-core reactive observer state.

Responsibilities:

  • Persist artifact-indexed observer state in entity chunk storage.

Does NOT:

  • Own baked observer definitions or change their ordering.

C#
public BitQuirky.Behavior.Execution.ReactiveConditionRuntimeState Value

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1329

Shared-core observer state stored for this artifact table row.

Category: Low-level runtime

C#
enum BitQuirky.Behavior.Execution.BehaviorReferencePhase

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:184-203

Underlying type: byte

Persistent lifecycle phase of one baked state-machine reference.

C#
Faulted = 5

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:202

The nested machine stopped on a runtime fault; its fault result is retained for inspection.

C#
Finished = 4

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:199

The nested machine completed and its result is retained for inspection.

C#
Outside = 0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:187

Execution has left the reference entirely and returned to the containing machine.

C#
Parked = 1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:190

The reference is entered but no candidate could be selected, so nothing nested is running.

C#
Running = 2

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:193

A selected candidate machine is currently executing inside the reference.

C#
Suspended = 3

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:196

A Push transition suspended the reference; its cursor is retained for the eventual return.

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.BehaviorReferenceRuntimeState

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:216-252

Retained runtime reading for one baked state-machine reference.

Responsibilities:

  • Preserve the selected candidate, nested cursor, terminal result, and host transition boundary after execution leaves the reference.
  • Stay blittable and reference-indexed for allocation-free runtime and Live inspection.

Does NOT:

  • Own baked data, choose candidates, or change state-machine execution.

C#
public static BitQuirky.Behavior.Execution.BehaviorReferenceRuntimeState Outside { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:240-251

Gets the cleared value for a reference execution has not entered, using the -1 and None sentinels the runtime tests against.

C#
public int ActiveMachineIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:222

Composed state-machine table row the selected candidate resolves to, or -1.

C#
public int ActiveStateIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:224

Baked node index of the state the reference was last observed in, or -1.

C#
public int CandidateNodeIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:220

Baked node index of the selected candidate, or -1 while the reference is parked or not entered.

C#
public BitQuirky.Behavior.Execution.BehaviorActionLifecycleRuntimeState HostActionLifecycle

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:237

Owning reference-state lifecycle retained while its child machine runs.

C#
public int HostTransitionIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:232

Interned string index of the host transition that entered or left this reference, reset to -1 once the machine reaches a terminal result.

C#
public int HostTransitionTick

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:234

Host frame paired with HostTransitionIndex, or -1.

C#
public BitQuirky.Behavior.Execution.BehaviorReferencePhase Phase

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:226

Lifecycle phase this reference was left in.

C#
public BitQuirky.Behavior.Execution.BehaviorMachineResult Result

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:228

Terminal result of the referenced machine, or None while it is still running.

C#
public int ResultTick

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:230

Host frame that recorded Result, or -1 before the machine completes.

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.BehaviorRepeatRuntimeState

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:379-383

Persistent progress for one baked Repeat decorator, indexed by its baked node.

Responsibilities:

  • Retain the completed-attempt count independently for each Repeat decorator.
  • Allow nested Repeat decorators to remain active without sharing progress.

Does NOT:

  • Choose a repeat policy, evaluate a child, or retain progress after the decorator exits.

C#
public int IterationsCompleted

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:382

Completed child attempts in the current structural activation.

Category: Low-level runtime

C#
enum BitQuirky.Behavior.Execution.BehaviorResultCode

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:57-96

Underlying type: byte

Per-leaf result code propagated through composites and surfaced via follower.behavior-report. Mirror of BehaviorNodeStatuskept on the runtime instance so the trace can replay the most recent terminal status without re-walking the tree.

C#
AuthorityHandoff = 8

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:84

The node’s outstanding external request was cancelled by an authority handoff.

C#
AuthorityMismatch = 7

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:81

The node was refused because the executing role does not satisfy the node’s authority.

C#
Blocked = 5

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:75

The node’s predicate did not hold, so execution does not pass it this tick.

C#
ExecutionLimitExceeded = 11

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:93

The tick exceeded its maximum evaluation-step budget. Counts as a runtime fault, not an authored Failure.

C#
ExternalServiceRefused = 9

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:87

The external service refused the command, or no completion slot could be reserved for it.

C#
Failure = 3

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:69

The node completed unsuccessfully as authored.

C#
Faulted = 12

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:95

A configuration or runtime fault, never an authored Failure outcome.

C#
Interrupted = 4

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:72

The node was cancelled before it settled, most often by a latched transition.

C#
None = 0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:60

No result has been recorded for this activation yet.

C#
Running = 1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:63

The node is still working and is resumed on the next tick.

C#
SubgraphError = 10

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:90

A referenced subgraph could not run. Counts as a runtime fault, not an authored Failure.

C#
Success = 2

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:66

The node completed successfully.

C#
Timeout = 6

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:78

A deferred invocation gave up after its time budget elapsed.

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.BehaviorRuntimeArtifactBinding

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:491-566

Implements: IComponentData

Per-entity binding to a baked artifact’s native arrays. The host stamps this when it spawns an agent so main-thread composition can keep the artifact association explicit. The batched job does not read this component because native containers inside components are not job-safe; BehaviorRuntimeTickIdentityis the job-side opt-in marker.

C#
public bool IsValid { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:565

Gets whether this binding has been stamped with a baked artifact’s node table.

C#
public int AnyStateNodeIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:552

Baked node index of the optional Any State plate, or -1 when absent.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedAuthorityEntry> AuthorityTable

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:527

Dense field-id to owner-authority rows the runtime authority gate scans without reading whole blackboard slots.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedBlackboardSlot> BlackboardLayout

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:525

Blackboard slots: field id, type code, byte offset, and owning authority for each declared graph field.

C#
public Unity.Collections.NativeArray<int> EmitServiceIds

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:535

Flattened service-id hashes a node emits without awaiting completion, addressed by its (EmitServiceStart, EmitServiceCount) range.

C#
public int EntryStateIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:550

Baked node index of the statechart’s entry state, or -1 when the graph has no statechart.

C#
public int ExecutionStepLimit

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:554

Maximum evaluation steps one tick may take; exhausting it faults the machine with ExecutionLimitExceeded. A non-positive value is treated as a single step.

C#
public int FollowerId

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:562

Follower id this binding belongs to. Set by the host runtime when registering a follower. The batched job reads FollowerIdfor pause / step decisions because this binding is main-thread state.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedHostedResultEventCondition> HostedResultEventConditions

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:511

Hosted terminal-result event conditions that transitions address by index.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedInterruptibleServiceRequirement> InterruptibleServiceRequirements

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:545-546

Service capabilities required by the reactive condition definitions.

C#
public Unity.Collections.NativeArray<int> MemberOperationByNode

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:541

Member operation row for each baked node index, or -1; empty when the graph has no member bindings.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedMemberOperation> MemberOperations

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:539

Baked member operations, each describing one node’s binding to a method, property, field, or event on a customer component.

C#
public Unity.Collections.NativeArray<byte> NativeDefaultBytes

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:519

Declared blackboard defaults in the same byte layout as the live blackboard, copied on initialization; empty when the graph declares none.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedNode> Nodes

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:494

The artifact’s baked node table; every node index the runtime reports is a position in this array.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedNodeParameter> Parameters

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:537

Dense semantic node parameter table carrying each parameter’s stable id, type tag, and value words.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedReactiveCondition> ReactiveConditions

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:543

Deterministically ordered reactive condition definitions.

C#
public Unity.Collections.NativeArray<int> ReadFieldIds

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:529

Flattened read-set field id hashes, addressed by each node’s (ReadFieldStart, ReadFieldCount) range.

C#
public int RootNodeIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:548

Baked node index of the graph’s behavior tree root, or -1 when the graph has none.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateActionList> StateActionLists

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:505

State-owned direct-action list rows, each naming its state node and a range into StateActionNodeIndices.

C#
public Unity.Collections.NativeArray<int> StateActionNodeIndices

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:507

Baked node indices of direct actions flattened in authored order, addressed by the (ActionNodeStart, ActionCount) range on a StateActionLists row.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateHostedBehavior> StateHostedBehaviors

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:509

Lifecycle rows for state-owned hosted behavior trees.

C#
public Unity.Collections.NativeArray<int> StateIndexByNode

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:523

Row index into StatechartStates for each baked node index, or -1 for nodes that are not states.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachineCandidate> StateMachineCandidates

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:517

Ordered candidate rows for every referenced-machine node.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachineReference> StateMachineReferences

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:515

Referenced-machine nodes, each naming a (CandidateStart, CandidateCount) range into StateMachineCandidates.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachine> StateMachines

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:513

Composed state-machine rows; row zero is the host machine.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Nodes.State.StatechartState> StatechartStates

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:521

One dense row per baked state node, reached through StateIndexByNode.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedTransitionCondition> TransitionConditions

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:500

Transition predicate rows, addressed by each transition’s (ConditionStart, ConditionCount) range.

C#
public Unity.Collections.NativeArray<byte> TransitionConstantBytes

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:503

Deterministic wide constants of declared transition operands .

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedTransition> Transitions

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:496

The artifact’s transition table; a state’s outgoing edges are the contiguous run of rows whose source is that state.

C#
public Unity.Collections.NativeArray<int> WaitsServiceIds

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:533

Flattened service-id hashes a node waits on for completion, addressed by its (WaitsServiceStart, WaitsServiceCount) range.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedWeightedChild> WeightedChildren

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:498

Weighted children of every Probability Selector, addressed by the selector node’s (WeightedChildStart, WeightedChildCount) range.

C#
public Unity.Collections.NativeArray<int> WriteFieldIds

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:531

Flattened write-set field id hashes, addressed by each node’s (WriteFieldStart, WriteFieldCount) range.

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.BehaviorRuntimeBlackboardByte

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1339-1349

Implements: IBufferElementData

Per-follower blackboard byte buffer. Stored as a DynamicBuffer on the follower entity so the per-instance allocation lives in ECS chunks alongside the cursor component. Its logical payload is sized from BlackboardByteSize; synchronized entity graphs append fixed package-private write-journal metadata after that payload.

C#
public byte Value

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1343

One byte of the blackboard payload, at the offset given by this element’s buffer index.

op_Implicit(BehaviorRuntimeBlackboardByte b)

Section titled “op_Implicit(BehaviorRuntimeBlackboardByte b)”
C#
public static implicit operator byte(BitQuirky.Behavior.Execution.BehaviorRuntimeBlackboardByte b)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1346

Unwraps a buffer element to the raw blackboard byte it stores.

C#
public static implicit operator BitQuirky.Behavior.Execution.BehaviorRuntimeBlackboardByte(byte v)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1348

Wraps a raw blackboard byte so it can be written into the buffer.

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.BehaviorRuntimeInstance

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:655-1313

Implements: IComponentData

Per-follower live execution state for a Layer 2 behavior graph.

Responsibilities:

  • Carry the full runtime cursor: graph-id, current-node-id, current-state-id, last-transition-id / cause-id, last-result-code, authority-context-id, trace-tier, per data-model.md §Behavior Runtime Instance.
  • Hold up toMaxPendingExternalsoutstanding pending- external slots so the tick job can resume on completion ring records without managed allocation.
  • Stamp the last-transition / last-result fields after every leaf tick so the always-on trace and Quantum Console state commands can read them on demand without sampling the tick directly.
  • Carry the single state-hosted behavior tree cursor: owning state, baked lifetime, completed cycle count, last terminal cycle frame, and the recorded terminal result and result-event id, so hosted lifetime, result events, and interruption behave identically in every object model.
  • State-transition rule (every leaf tick): start in Running; resolve to one of Success / Failure / Interrupted / Blocked / Timeout / AuthorityMismatch / AuthorityHandoff / ExternalServiceRefused / SubgraphError; transition-edge fires update CurrentStateId+ record LastTransitionCauseId.

Does NOT:

  • Allocate per-follower buffers (those live on BehaviorRuntimeInstanceDataas ECS buffer elements when the entities package is present, or on the managed shadow handle when it is not).
  • Parse Mermaid (FR-012f).
  • Mutate consumer gameplay data directly. Node side effects flow through External Service Adapters (Layer 3).

C#
public uint ActionActivationGeneration

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:903

Monotonic activation generation for direct state action lists.

C#
public BitQuirky.Behavior.Execution.BehaviorActionLifecycleRuntimeState ActionLifecycle

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:909

Bounded Entry, Active Update, and Exit lifecycle progress for the active action state, including the latched destination and the single remaining Exit evaluation.

C#
public int ActiveDecoratorNodeIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:760

Active node whose decorator ancestry owns the persistent Repeat and Time Limit rows. Comparing this cursor withCurrentNodeIndexlets the tick core clear only decorators exited by an ancestry change.

C#
public int ActiveMachineIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:729

Active composed-machine row; zero is the host machine.

C#
public int ActiveNestedReferenceNodeIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:714

Requested frame capacity when a Push could not fit this tick.

C#
public int ActiveProbabilitySelectorIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:783

Active probability selector, or -1 when no weighted selection is active.

C#
public int ActiveStateMachineCandidateIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:723

Selected referenced-machine candidate node, or -1 while parked/outside.

C#
public int ActiveStateMachineReferenceIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:720

Referenced-machine node currently executing, or -1 outside a reference.

C#
public BitQuirky.Behavior.Baked.BakedAuthorityContext AuthorityContextId

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:845

Authority this instance was attached under, compared against each node’s declared authority by the runtime gate before that node may tick.

C#
public int CompositeChildCursor

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:747

Per-composite cursor child index. The tick job walks composites iteratively; this preserves the position across frames when a child isRunning.

C#
public float CurrentNodeElapsedSeconds

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:768

Wall-clock seconds the current cursor has been ticking, surfaced by the always-on trace. Time Limit decorators retain their subtree clocks independently in BehaviorTimeLimitRuntimeStaterows.

C#
public int CurrentNodeIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:694

Active baked-node index. -1 when the instance is unscheduled (just spawned, or just transitioned with no entry tick yet).

C#
public int CurrentStateIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:705

Active top-level statechart state’s baked-node index.

C#
public int DecoratorIterationsCompleted

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:754

Compatibility mirror of the activeRepeatprogress. Authoritative nested progress lives in artifact-indexed BehaviorRepeatRuntimeStaterows supplied to the tick core.

C#
public int DeepestExecutedNodeIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:700

Deepest node executed during the latest tick, or -1 when the latest tick did not execute a node or the runtime has just been reset.

C#
public ulong GraphContentHash

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:680

Hash of the baked artifact this instance ticks against. Used to detect graph hot-swap (when the loader rebakes from updated Mermaid, the hash changes and the instance resets).

C#
public int GraphId

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:688

Identifier of the loaded graph. Implementation defines the id scheme (e.g. interned string-table index in the FollowerBehaviorRuntimeor a source hash); the runtime treats it as opaque.

C#
public int HostedCompletedCycleCount

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:940

Terminal hosted cycles completed sinceHostedStateIndexwas entered.

C#
public byte HostedEventPending

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:970

1 while a recorded result event still awaits its single immediate transition evaluation. An unmatched event expires before the next hosted cycle starts.

C#
public int HostedLastCycleFrame

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:946

Frame that recorded the latest terminal hosted cycle, or -1. A Repeat lifetime uses it to start its fresh cycle on the next state-machine tick rather than the current one.

C#
public BitQuirky.Behavior.Baked.BakedHostedBehaviorLifetime HostedLifetime

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:961

Baked lifetime of the hosted tree owned byHostedStateIndex. An omitted authored lifetime bakes toRepeat.

C#
public byte HostedReserved0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:973

Alignment padding that keeps the hosted cursor four-byte aligned.

C#
public BitQuirky.Behavior.Execution.BehaviorResultCode HostedResultCode

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:964

Terminal result of the latest hosted cycle, or None.

C#
public int HostedResultEventId

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:955

Interned result-event id recorded by the latest terminal hosted cycle, or 0 when that outcome has no configured event.

C#
public int HostedResultTick

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:949

Input tick that produced the held hosted result, or -1 before completion.

C#
public int HostedStateIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:935

State that owns the active hosted behavior tree, or -1 when no hosted tree is active. Entry, exit, and reset rewrite the whole hosted cursor as one unit .

C#
public uint InitialRandomSeed

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:773

Seed supplied when this runtime instance was created.

C#
public int LastEvaluatedTransitionPredicateId

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:823

Stable hash of the graph field the most recently evaluated transition predicate read as its left operand, or -1 when no predicate group has been evaluated.

C#
public int LastEvaluatedTransitionRightFieldId

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:833

Stable hash of the graph value the most recently evaluated transition predicate compared against, or -1 when that predicate compared against its baked constant. Paired withLastEvaluatedTransitionPredicateIdthis names both operands of the deciding comparison, so a trace consumer can tell live_enemies >= 2200 apart from live_enemies >= $surge_live_enemy_limit without reopening the baked artifact.

C#
public BitQuirky.Behavior.Execution.BehaviorInterruptionRecord LastInterruption

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:855

Latest structured branch interruption, if one has occurred.

C#
public int LastProbabilitySelectorIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:791

Random Selector that owns the retained selected outcome and candidate mask, or -1 before any selection and after reset or interruption. This remains set after Direct failure ends a pass so Live presentation never attributes its unreached branches to another selector.

C#
public BitQuirky.Behavior.Execution.BehaviorResultCode LastResultCode

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:835

Result of the most recent step, stamped by RecordLastResult; None before the first tick.

C#
public int LastTickedFrame

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:852

Host frame of the last completed tick, including a state pass with no leaf work.

C#
public int LastTransitionCauseId

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:815

What satisfied that transition: the stable hash of the deciding graph field for a condition-group edge, otherwise the baked node index of the edge’s condition node; -1 before any transition fires.

C#
public int LastTransitionFrame

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:821

Frame on which the most recent state-machine transition fired, or -1 before one fires. The editor uses this event stamp to distinguish an existing historical transition from a transition that fires after a Live attachment begins.

C#
public int LastTransitionId

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:813

Interned string index of the most recently fired transition’s authored id, or -1 before any transition fires.

C#
public byte MachineFinished

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:740

One after terminal completion, including Return with no suspended caller.

C#
public BitQuirky.Behavior.Execution.BehaviorMachineResult MachineResult

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:841

Explicit final state-machine result. UnlikeLastResultCode, this value remainsNonewhile the machine is active and keeps the terminal result observable after execution stops.

C#
public const int MaxPendingExternals = 4

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:669

Maximum pending externals tracked per follower. Each adapter is expected to use at most one slot at a time; four covers the canonical adapters (path, animation, follower-state, house-combat) without spilling to the heap.

C#
public uint MemberActivationGeneration

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:925

Monotonic activation generation stamped onto each deferred coroutine or event member operation so a stale callback cannot complete a later activation .

C#
public BitQuirky.Behavior.Execution.BehaviorMemberRequestSlot MemberRequest

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:919

The single in-flight immediate member request channel serviced by the host through a bounded in-tick microstep .

C#
public BitQuirky.Behavior.Execution.BehaviorNestedMachinePhase NestedMachinePhase

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:735

Stable lifecycle phase of the active/last referenced machine.

C#
public BitQuirky.Behavior.Execution.BehaviorMachineResult NestedMachineResult

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:732

Final result of the most recently completed nested machine.

C#
public int NextCommandId

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:900

Next command identifier owned by this runtime instance. Per-agent ownership keeps parallel ticks independent while completion matching remains scoped by entity, command, and service ids.

C#
public BitQuirky.Behavior.Execution.PendingExternalSlot Pending0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:887

Pending-external slot 0; its InUse byte is zero while the slot is free. Prefer GetPending and SetPending for index-addressed access.

C#
public BitQuirky.Behavior.Execution.PendingExternalSlot Pending1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:889

Pending-external slot 1.

C#
public BitQuirky.Behavior.Execution.PendingExternalSlot Pending2

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:891

Pending-external slot 2.

C#
public BitQuirky.Behavior.Execution.PendingExternalSlot Pending3

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:893

Pending-external slot 3.

C#
public ulong ProbabilityCandidateMask

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:806

Eligible weighted children, addressed by authored child order. After a pass ends by Direct failure the remaining bits are retained, so the branches the pass never reached stay observable until the selector is entered again.

C#
public uint RandomState

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:778

Current deterministic pseudo-random state for probability nodes.

C#
public uint ReferenceActivationGeneration

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:726

Monotonic identity of the latest referenced-machine candidate activation.

C#
public byte ReferenceParked

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:737

One while a reference is parked because no candidate is eligible.

C#
public byte RepeatRestartedThisFrame

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:871

Non-zero once, anywhere since the last genuinely new host frame (identified by RepeatRestartedThisFrameNumber, not by delta), a Repeat decorator has restarted and re-descended into a fresh leaf (TickDecorator’s BakedNodeKind.Repeatcase). A host that re-entersTickOnewith a zero delta to drain an immediate member request microstep ( Phase 7B) reuses the real tick’s own FrameNumber, so it falls through to observe rather than clear this flag; a restart discovered by one microstep therefore still stops a later microstep in the same real frame from redescending through a once-per-frame blackboard-sampled fact the restart itself just invalidated. Cleared only when a tick carries a new FrameNumber, whether or not that frame’s delta is zero, so a paused or frame-stepped host still yields exactly once per real frame instead of freezing.

C#
public int RepeatRestartedThisFrameNumber

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:880

HostFrameNumber as of the last Stepentry that evaluatedRepeatRestartedThisFramefor a reset. Compared against the incomingFrameNumber rather than DeltaSeconds, so a genuinely new host frame clears the flag even when that frame’s delta is zero, as happens for a paused or frame-stepped host. Sentinel-1before the first tick.

C#
public int RequiredSuspendedActionCapacity

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:718

Requested sparse action capacity when a Push could not fit this tick.

C#
public int RequiredSuspensionFrameCapacity

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:716

Frame capacity a Push needed when the suspension-frame buffer was too small this tick, or 0; the host grows the buffer to at least this size and the Push retries on a later tick.

C#
public byte Reserved0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:847

Reserved byte kept zero for additive binary evolution.

C#
public int SelectedProbabilityChildIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:799

Selected weighted child, or -1 before activation and after reset. The value -2 means the Random Selector drew its optional Direct failure outcome and ended the pass without ticking a child, which is what tells a direct failure apart from a pass that simply exhausted its candidates.

C#
public int SuspendedActionStateCount

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:711

Used rows in the sparse suspended-action pool.

C#
public int SuspensionDepth

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:708

Number of preserved Push activations beneath the active state.

C#
public BitQuirky.Behavior.Execution.BehaviorTraceTier TraceTier

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:843

Trace verbosity this instance publishes; ForReplacement carries it forward.

C#
public void CancelAllPending()

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1225-1232

Cancel every outstanding pending slot, used by AuthorityHandoffHandler after an authority handoff.

C#
public void ClearHostedCursor()

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1285-1295

Stop the active hosted behavior tree. State exit, graph restart, and reset clear the cursor so an interrupted cycle can never record a later terminal result event.

C#
public void EnterLatchedState(int newStateIndex)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1259-1279

Enter a chosen destination state with clean cursor, lifecycle, and activation generation so no completion from the previous activation can be accepted.

C#
public int FindPendingByCommand(int commandId)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1182-1190

Find a pending slot matchingcommandId; returns -1 when not found.

ForArtifact(BakedBehaviorArtifact artifact, int graphId, BakedAuthorityContext authority, BehaviorTraceTier tier)

Section titled “ForArtifact(BakedBehaviorArtifact artifact, int graphId, BakedAuthorityContext authority, BehaviorTraceTier tier)”
C#
public static BitQuirky.Behavior.Execution.BehaviorRuntimeInstance ForArtifact(BitQuirky.Behavior.Baked.BakedBehaviorArtifact artifact, int graphId, BitQuirky.Behavior.Baked.BakedAuthorityContext authority, BitQuirky.Behavior.Execution.BehaviorTraceTier tier = AlwaysOn)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:985-995

Build a first-attach instance bound to the given baked artifact. Caller is responsible for separately allocating the per-follower blackboard buffer (BehaviorRuntimeBlackboardByte). Graph replacement must use ForReplacementso command and activation identity remain monotonic.

ForArtifact(BakedBehaviorArtifact artifact, int graphId, BakedAuthorityContext authority, uint randomSeed, BehaviorTraceTier tier)

Section titled “ForArtifact(BakedBehaviorArtifact artifact, int graphId, BakedAuthorityContext authority, uint randomSeed, BehaviorTraceTier tier)”
C#
public static BitQuirky.Behavior.Execution.BehaviorRuntimeInstance ForArtifact(BitQuirky.Behavior.Baked.BakedBehaviorArtifact artifact, int graphId, BitQuirky.Behavior.Baked.BakedAuthorityContext authority, uint randomSeed, BitQuirky.Behavior.Execution.BehaviorTraceTier tier = AlwaysOn)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1001-1015

Build a first-attach instance with an explicit deterministic random seed. Graph replacement must useForReplacement.

ForReplacement(BakedBehaviorArtifact artifact, int graphId, BakedAuthorityContext authority, in BehaviorRuntimeInstance previous, uint randomSeed)

Section titled “ForReplacement(BakedBehaviorArtifact artifact, int graphId, BakedAuthorityContext authority, in BehaviorRuntimeInstance previous, uint randomSeed)”
C#
public static BitQuirky.Behavior.Execution.BehaviorRuntimeInstance ForReplacement(BitQuirky.Behavior.Baked.BakedBehaviorArtifact artifact, int graphId, BitQuirky.Behavior.Baked.BakedAuthorityContext authority, in BitQuirky.Behavior.Execution.BehaviorRuntimeInstance previous, uint randomSeed = 0)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1022-1044

Build a replacement instance while carrying the previous runtime’s command and activation identity forward. The replacement starts a fresh action activation and retains the prior trace tier.

C#
public BitQuirky.Behavior.Execution.PendingExternalSlot GetPending(int slotIndex)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1120-1130

Read pending slot at index (0..MaxPendingExternals-1).

RecordLastResult(BehaviorResultCode code, int frame)

Section titled “RecordLastResult(BehaviorResultCode code, int frame)”
C#
public void RecordLastResult(BitQuirky.Behavior.Execution.BehaviorResultCode code, int frame)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1237-1241

Stamp result of the most recent leaf tick onto the trace mirror.

RecordTransition(int transitionId, int causeId, int newStateIndex, int frameNumber)

Section titled “RecordTransition(int transitionId, int causeId, int newStateIndex, int frameNumber)”
C#
public void RecordTransition(int transitionId, int causeId, int newStateIndex, int frameNumber)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1302-1310

Stamp the most recent transition id and stable cause identifier onto the trace mirror and immediately enter the destination state. This low-level mutation bypasses the shared tick scheduler’s latched transition timing.

RecordTransitionLatch(int transitionId, int causeId, int frameNumber)

Section titled “RecordTransitionLatch(int transitionId, int causeId, int frameNumber)”
C#
public void RecordTransitionLatch(int transitionId, int causeId, int frameNumber)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1248-1253

Stamp the most recent transition id and stable cause identifier onto the trace mirror without leaving the source state. The shared scheduler uses this while the destination is latched across the transition-frame boundary and any bounded Exit.

C#
public void ReleasePendingSlot(int slotIndex)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1215-1218

Free a pending slot.

C#
public int ReserveCommandId()

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1196-1210

Reserves the next positive command identifier without shared mutable storage. Active identifiers are skipped when the counter wraps.

SetPending(int slotIndex, PendingExternalSlot value)

Section titled “SetPending(int slotIndex, PendingExternalSlot value)”
C#
public void SetPending(int slotIndex, BitQuirky.Behavior.Execution.PendingExternalSlot value)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1135-1144

Write pending slot at index (0..MaxPendingExternals-1).

TryReservePendingSlot(int serviceId, int commandId, int pendingId, int frame, int owningNodeIndex)

Section titled “TryReservePendingSlot(int serviceId, int commandId, int pendingId, int frame, int owningNodeIndex)”
C#
public int TryReservePendingSlot(int serviceId, int commandId, int pendingId, int frame, int owningNodeIndex = -1)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1151-1176

Allocate the next free pending slot, return its index. Returns -1 when full; the runtime treats this as a typed ExternalServiceRefused.

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.BehaviorRuntimeTickIdentity

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:585-589

Implements: IComponentData

Job-safe identity for an entity that may be advanced by BehaviorTickSystem. The artifact binding holds native containers and therefore cannot be read by or used to filter the batched job; this small companion component marks the entity as tickable and carries only the follower id needed for debug pause / step decisions.

Responsibilities:

Does NOT:

  • Carry baked graph tables or blackboard storage.
  • Define entity lifetime or stable service identity; commands and completions useEntityIdfor that.

C#
public int FollowerId

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:588

Host-defined id used by debug pause / step decisions.

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.BehaviorStateSuspensionFrame

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:540-618

One native suspension frame created by Push. The frame preserves the complete scheduler cursor for one activation; action rows are stored in the companion depth-indexed table.

C#
public uint ActionActivationGeneration

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:569

Saved action activation generation, so completions issued before the Push still match on return.

C#
public BitQuirky.Behavior.Execution.BehaviorActionLifecycleRuntimeState ActionLifecycle

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:571

Saved Entry, Active Update, and Exit lifecycle progress of the suspended state.

C#
public int ActiveDecoratorNodeIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:556

Active decorator ancestry owned by this suspended activation. The shared tick core uses this exact prior cursor to retain Resume lifetimes and clear discarded or re-entered activations without scanning the graph.

C#
public int ActiveMachineIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:603

Saved composed-machine row; zero is the host machine.

C#
public int ActiveNestedReferenceNodeIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:597

Saved composed reference node, including hidden nested references, or -1.

C#
public int ActiveProbabilitySelectorIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:561

Saved active weighted selector node index, or -1.

C#
public int ActiveStateMachineCandidateIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:601

Saved selected referenced-machine candidate node index, or -1.

C#
public int ActiveStateMachineReferenceIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:599

Saved referenced-machine table row, or -1.

C#
public int CompositeChildCursor

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:548

Saved composite child cursor of the suspended activation.

C#
public float CurrentNodeElapsedSeconds

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:559

Saved seconds the suspended cursor had been ticking.

C#
public int CurrentNodeIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:546

Saved active node index, restored verbatim when execution returns to this frame.

C#
public int DecoratorIterationsCompleted

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:550

Saved Repeat decorator iteration count of the suspended activation.

C#
public int HostedCompletedCycleCount

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:575

Saved count of terminal hosted cycles completed in the suspended state.

C#
public byte HostedEventPending

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:587

Saved flag for a hosted result event that still owes its single transition evaluation.

C#
public int HostedLastCycleFrame

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:577

Saved frame of the latest terminal hosted cycle, or -1.

C#
public BitQuirky.Behavior.Baked.BakedHostedBehaviorLifetime HostedLifetime

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:583

Saved baked lifetime of the suspended hosted tree.

C#
public BitQuirky.Behavior.Execution.BehaviorResultCode HostedResultCode

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:585

Saved terminal result of the latest hosted cycle, or None.

C#
public int HostedResultEventId

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:581

Saved interned result-event id of the latest hosted cycle, or 0 when that outcome has no configured event.

C#
public int HostedResultTick

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:579

Saved input tick that produced the held hosted result, or -1.

C#
public int HostedStateIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:573

Saved owner of the suspended activation’s hosted behavior tree, or -1.

C#
public int LastProbabilitySelectorIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:563

Saved last weighted selector node index, or -1.

C#
public BitQuirky.Behavior.Execution.BehaviorNestedMachinePhase NestedMachinePhase

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:607

Saved lifecycle phase of the active or last referenced machine.

C#
public BitQuirky.Behavior.Execution.BehaviorMachineResult NestedMachineResult

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:605

Saved final result of the most recently completed nested machine.

C#
public BitQuirky.Behavior.Nodes.State.StateTransitionOnReturn OnReturn

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:611

Authored on-return policy of the Push transition that created this frame, applied when execution returns here.

C#
public BitQuirky.Behavior.Execution.PendingExternalSlot Pending0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:589

Saved pending-external slot 0; the Push clears the live instance’s slots so only this frame owns them.

C#
public BitQuirky.Behavior.Execution.PendingExternalSlot Pending1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:591

Saved pending-external slot 1.

C#
public BitQuirky.Behavior.Execution.PendingExternalSlot Pending2

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:593

Saved pending-external slot 2.

C#
public BitQuirky.Behavior.Execution.PendingExternalSlot Pending3

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:595

Saved pending-external slot 3.

C#
public ulong ProbabilityCandidateMask

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:567

Saved eligible weighted children, addressed by authored child order.

C#
public byte ReferenceParked

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:609

Saved parked flag for a reference whose candidates were all ineligible.

C#
public ushort Reserved

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:613

Alignment padding kept zero for additive binary evolution.

C#
public int SelectedProbabilityChildIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:565

Saved weighted child selection, carrying the same -1 and -2 sentinels as the live cursor.

C#
public int StateIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:544

Baked node index of the state this Push suspended.

C#
public int SuspendedActionCount

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:617

Rows this frame owns in the suspended-action pool, one per direct action of the suspended state.

C#
public int SuspendedActionStart

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:615

First row this frame owns in the shared suspended-action pool, forming a (start, count) range with SuspendedActionCount over the BehaviorActionRuntimeState table.

Category: Low-level runtime

C#
class BitQuirky.Behavior.Execution.BehaviorTick

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:327-1001

The single Burst-callable per-agent tick core (Principle III: one shared core, both object models).TickOneadvances exactly one agent’sBehaviorRuntimeInstanceand blackboard by one step, operating on the blackboard in place. The batched BehaviorTickJobcalls it once per agent from a parallel IJobEntity; the Samples~/ToyGraphdriver and the EditMode suites call it directly on the main thread. Because all three paths share this core, node / statechart / external-service semantics are identical across them .

Responsibilities:

  • Provide the one entry point that every tick caller routes through, so the batched parallel path and the single-agent test/sample path can never diverge.

Does NOT:

  • Schedule jobs or touch ECS: that isBehaviorTickSystem.
  • Allocate managed garbage on the hot path.

CancelAndReset(ref BehaviorRuntimeInstance instance, BakedBehaviorArtifact artifact, uint randomSeed, EntityId entityId, int frameNumber, NativeArray<BehaviorActionRuntimeState> actionStates, NativeArray<BehaviorNodeExecutionStatus> nodeExecutionStatuses, NativeArray<BehaviorStateSuspensionFrame> suspensionFrames, NativeArray<BehaviorActionRuntimeState> suspendedActionStates, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter)

Section titled “CancelAndReset(ref BehaviorRuntimeInstance instance, BakedBehaviorArtifact artifact, uint randomSeed, EntityId entityId, int frameNumber, NativeArray<BehaviorActionRuntimeState> actionStates, NativeArray<BehaviorNodeExecutionStatus> nodeExecutionStatuses, NativeArray<BehaviorStateSuspensionFrame> suspensionFrames, NativeArray<BehaviorActionRuntimeState> suspendedActionStates, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter)”
C#
public static void CancelAndReset(ref BitQuirky.Behavior.Execution.BehaviorRuntimeInstance instance, BitQuirky.Behavior.Baked.BakedBehaviorArtifact artifact, uint randomSeed, UnityEngine.EntityId entityId, int frameNumber, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorActionRuntimeState> actionStates, Unity.Collections.NativeArray<BitQuirky.Behavior.Diagnostics.BehaviorNodeExecutionStatus> nodeExecutionStatuses, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorStateSuspensionFrame> suspensionFrames, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorActionRuntimeState> suspendedActionStates, Unity.Collections.NativeQueue<BitQuirky.Behavior.ExternalService.ExternalServiceCommand>.ParallelWriter commandWriter)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:742-787

Cancel fixed, active-action, and suspended pending operations, then restore a fresh instance.

MarkInterruptedActionStatuses(NativeArray<BehaviorActionRuntimeState> actionStates, NativeArray<BehaviorNodeExecutionStatus> nodeExecutionStatuses)

Section titled “MarkInterruptedActionStatuses(NativeArray<BehaviorActionRuntimeState> actionStates, NativeArray<BehaviorNodeExecutionStatus> nodeExecutionStatuses)”
C#
public static void MarkInterruptedActionStatuses(Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorActionRuntimeState> actionStates, Unity.Collections.NativeArray<BitQuirky.Behavior.Diagnostics.BehaviorNodeExecutionStatus> nodeExecutionStatuses)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:707-723

Projects interrupted action rows onto the persistent per-node Live status.

MarkRunningNodesCanceled(NativeArray<BehaviorNodeExecutionStatus> statuses)

Section titled “MarkRunningNodesCanceled(NativeArray<BehaviorNodeExecutionStatus> statuses)”
C#
public static void MarkRunningNodesCanceled(Unity.Collections.NativeArray<BitQuirky.Behavior.Diagnostics.BehaviorNodeExecutionStatus> statuses)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:726-736

Retains cancellation evidence for the entire active execution path.

ResetActionStates(NativeArray<BehaviorActionRuntimeState> actionStates)

Section titled “ResetActionStates(NativeArray<BehaviorActionRuntimeState> actionStates)”
C#
public static void ResetActionStates(Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorActionRuntimeState> actionStates)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:680-690

Clears every per-action row while retaining host-owned native storage.

ResetExecutionStatuses(ref BehaviorRuntimeInstance instance, NativeArray<BehaviorNodeExecutionStatus> nodeExecutionStatuses)

Section titled “ResetExecutionStatuses(ref BehaviorRuntimeInstance instance, NativeArray<BehaviorNodeExecutionStatus> nodeExecutionStatuses)”
C#
public static void ResetExecutionStatuses(ref BitQuirky.Behavior.Execution.BehaviorRuntimeInstance instance, Unity.Collections.NativeArray<BitQuirky.Behavior.Diagnostics.BehaviorNodeExecutionStatus> nodeExecutionStatuses)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:637-649

Restore a persistent node-status vector and deepest cursor to their fresh state.

ResetReferenceStates(NativeArray<BehaviorReferenceRuntimeState> referenceStates)

Section titled “ResetReferenceStates(NativeArray<BehaviorReferenceRuntimeState> referenceStates)”
C#
public static void ResetReferenceStates(Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorReferenceRuntimeState> referenceStates)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:693-704

Restores every retained reference reading to its outside sentinel.

ResetRepeatStates(NativeArray<BehaviorRepeatRuntimeState> repeatStates)

Section titled “ResetRepeatStates(NativeArray<BehaviorRepeatRuntimeState> repeatStates)”
C#
public static void ResetRepeatStates(Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorRepeatRuntimeState> repeatStates)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:666-677

Clears every per-decorator attempt count when a graph instance resets.

ResetTimeLimitStates(NativeArray<BehaviorTimeLimitRuntimeState> timeLimitStates)

Section titled “ResetTimeLimitStates(NativeArray<BehaviorTimeLimitRuntimeState> timeLimitStates)”
C#
public static void ResetTimeLimitStates(Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorTimeLimitRuntimeState> timeLimitStates)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:652-663

Clears every per-decorator elapsed clock when a graph instance resets.

TickOne(ref BehaviorRuntimeInstance instance, NativeArray<byte> blackboard, in BehaviorTickBakedInput baked, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext executingContext, NativeArray<ExternalServiceCompletionRecord> completionRingSnapshot, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter)

Section titled “TickOne(ref BehaviorRuntimeInstance instance, NativeArray<byte> blackboard, in BehaviorTickBakedInput baked, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext executingContext, NativeArray<ExternalServiceCompletionRecord> completionRingSnapshot, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter)”
C#
public static BitQuirky.Behavior.Execution.BehaviorTickStepResult TickOne(ref BitQuirky.Behavior.Execution.BehaviorRuntimeInstance instance, Unity.Collections.NativeArray<byte> blackboard, in BitQuirky.Behavior.Execution.BehaviorTickBakedInput baked, UnityEngine.EntityId entityId, int frameNumber, float deltaSeconds, in BitQuirky.Behavior.Authority.AuthorityContext executingContext, Unity.Collections.NativeArray<BitQuirky.Behavior.ExternalService.ExternalServiceCompletionRecord> completionRingSnapshot, Unity.Collections.NativeQueue<BitQuirky.Behavior.ExternalService.ExternalServiceCommand>.ParallelWriter commandWriter)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:336-360

Advance one agent by a single tick step. The blackboard is read and written in place (no per-agent temporary allocation); the runtime instance is updated through theinstanceref. Commands are appended tocommandWriterand command ids are reserved from the owning runtime instance.

TickOne(ref BehaviorRuntimeInstance instance, NativeArray<byte> blackboard, NativeArray<BehaviorNodeExecutionStatus> nodeExecutionStatuses, in BehaviorTickBakedInput baked, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext executingContext, NativeArray<ExternalServiceCompletionRecord> completionRingSnapshot, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter)

Section titled “TickOne(ref BehaviorRuntimeInstance instance, NativeArray<byte> blackboard, NativeArray<BehaviorNodeExecutionStatus> nodeExecutionStatuses, in BehaviorTickBakedInput baked, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext executingContext, NativeArray<ExternalServiceCompletionRecord> completionRingSnapshot, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter)”
C#
public static BitQuirky.Behavior.Execution.BehaviorTickStepResult TickOne(ref BitQuirky.Behavior.Execution.BehaviorRuntimeInstance instance, Unity.Collections.NativeArray<byte> blackboard, Unity.Collections.NativeArray<BitQuirky.Behavior.Diagnostics.BehaviorNodeExecutionStatus> nodeExecutionStatuses, in BitQuirky.Behavior.Execution.BehaviorTickBakedInput baked, UnityEngine.EntityId entityId, int frameNumber, float deltaSeconds, in BitQuirky.Behavior.Authority.AuthorityContext executingContext, Unity.Collections.NativeArray<BitQuirky.Behavior.ExternalService.ExternalServiceCompletionRecord> completionRingSnapshot, Unity.Collections.NativeQueue<BitQuirky.Behavior.ExternalService.ExternalServiceCommand>.ParallelWriter commandWriter)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:365-390

Advance one agent and retain the latest collapsed status for each baked node.

TickOne(ref BehaviorRuntimeInstance instance, NativeArray<byte> blackboard, NativeArray<ReactiveConditionRuntimeState> reactiveConditionStates, in BehaviorTickBakedInput baked, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext executingContext, NativeArray<ExternalServiceCompletionRecord> completionRingSnapshot, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter)

Section titled “TickOne(ref BehaviorRuntimeInstance instance, NativeArray<byte> blackboard, NativeArray<ReactiveConditionRuntimeState> reactiveConditionStates, in BehaviorTickBakedInput baked, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext executingContext, NativeArray<ExternalServiceCompletionRecord> completionRingSnapshot, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter)”
C#
public static BitQuirky.Behavior.Execution.BehaviorTickStepResult TickOne(ref BitQuirky.Behavior.Execution.BehaviorRuntimeInstance instance, Unity.Collections.NativeArray<byte> blackboard, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.ReactiveConditionRuntimeState> reactiveConditionStates, in BitQuirky.Behavior.Execution.BehaviorTickBakedInput baked, UnityEngine.EntityId entityId, int frameNumber, float deltaSeconds, in BitQuirky.Behavior.Authority.AuthorityContext executingContext, Unity.Collections.NativeArray<BitQuirky.Behavior.ExternalService.ExternalServiceCompletionRecord> completionRingSnapshot, Unity.Collections.NativeQueue<BitQuirky.Behavior.ExternalService.ExternalServiceCommand>.ParallelWriter commandWriter)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:395-420

Advance one agent with persistent artifact-indexed reactive condition state.

TickOne(ref BehaviorRuntimeInstance instance, NativeArray<byte> blackboard, NativeArray<ReactiveConditionRuntimeState> reactiveConditionStates, NativeArray<BehaviorNodeExecutionStatus> nodeExecutionStatuses, in BehaviorTickBakedInput baked, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext executingContext, NativeArray<ExternalServiceCompletionRecord> completionRingSnapshot, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter)

Section titled “TickOne(ref BehaviorRuntimeInstance instance, NativeArray<byte> blackboard, NativeArray<ReactiveConditionRuntimeState> reactiveConditionStates, NativeArray<BehaviorNodeExecutionStatus> nodeExecutionStatuses, in BehaviorTickBakedInput baked, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext executingContext, NativeArray<ExternalServiceCompletionRecord> completionRingSnapshot, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter)”
C#
public static BitQuirky.Behavior.Execution.BehaviorTickStepResult TickOne(ref BitQuirky.Behavior.Execution.BehaviorRuntimeInstance instance, Unity.Collections.NativeArray<byte> blackboard, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.ReactiveConditionRuntimeState> reactiveConditionStates, Unity.Collections.NativeArray<BitQuirky.Behavior.Diagnostics.BehaviorNodeExecutionStatus> nodeExecutionStatuses, in BitQuirky.Behavior.Execution.BehaviorTickBakedInput baked, UnityEngine.EntityId entityId, int frameNumber, float deltaSeconds, in BitQuirky.Behavior.Authority.AuthorityContext executingContext, Unity.Collections.NativeArray<BitQuirky.Behavior.ExternalService.ExternalServiceCompletionRecord> completionRingSnapshot, Unity.Collections.NativeQueue<BitQuirky.Behavior.ExternalService.ExternalServiceCommand>.ParallelWriter commandWriter)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:425-451

Advance one agent with persistent reactive state and node execution statuses.

TickOne(ref BehaviorRuntimeInstance instance, NativeArray<byte> blackboard, NativeArray<ReactiveConditionRuntimeState> reactiveConditionStates, NativeArray<BehaviorNodeExecutionStatus> nodeExecutionStatuses, NativeArray<BehaviorRepeatRuntimeState> repeatStates, NativeArray<BehaviorTimeLimitRuntimeState> timeLimitStates, in BehaviorTickBakedInput baked, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext executingContext, NativeArray<ExternalServiceCompletionRecord> completionRingSnapshot, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter)

Section titled “TickOne(ref BehaviorRuntimeInstance instance, NativeArray<byte> blackboard, NativeArray<ReactiveConditionRuntimeState> reactiveConditionStates, NativeArray<BehaviorNodeExecutionStatus> nodeExecutionStatuses, NativeArray<BehaviorRepeatRuntimeState> repeatStates, NativeArray<BehaviorTimeLimitRuntimeState> timeLimitStates, in BehaviorTickBakedInput baked, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext executingContext, NativeArray<ExternalServiceCompletionRecord> completionRingSnapshot, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter)”
C#
public static BitQuirky.Behavior.Execution.BehaviorTickStepResult TickOne(ref BitQuirky.Behavior.Execution.BehaviorRuntimeInstance instance, Unity.Collections.NativeArray<byte> blackboard, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.ReactiveConditionRuntimeState> reactiveConditionStates, Unity.Collections.NativeArray<BitQuirky.Behavior.Diagnostics.BehaviorNodeExecutionStatus> nodeExecutionStatuses, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorRepeatRuntimeState> repeatStates, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorTimeLimitRuntimeState> timeLimitStates, in BitQuirky.Behavior.Execution.BehaviorTickBakedInput baked, UnityEngine.EntityId entityId, int frameNumber, float deltaSeconds, in BitQuirky.Behavior.Authority.AuthorityContext executingContext, Unity.Collections.NativeArray<BitQuirky.Behavior.ExternalService.ExternalServiceCompletionRecord> completionRingSnapshot, Unity.Collections.NativeQueue<BitQuirky.Behavior.ExternalService.ExternalServiceCommand>.ParallelWriter commandWriter)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:490-520

Advance one agent with persistent reactive, execution-status, Repeat, and Time Limit state.

TickOne(ref BehaviorRuntimeInstance instance, NativeArray<byte> blackboard, NativeArray<ReactiveConditionRuntimeState> reactiveConditionStates, NativeArray<BehaviorNodeExecutionStatus> nodeExecutionStatuses, NativeArray<BehaviorRepeatRuntimeState> repeatStates, NativeArray<BehaviorTimeLimitRuntimeState> timeLimitStates, NativeArray<BehaviorActionRuntimeState> actionStates, in BehaviorTickBakedInput baked, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext executingContext, NativeArray<ExternalServiceCompletionRecord> completionRingSnapshot, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter)

Section titled “TickOne(ref BehaviorRuntimeInstance instance, NativeArray<byte> blackboard, NativeArray<ReactiveConditionRuntimeState> reactiveConditionStates, NativeArray<BehaviorNodeExecutionStatus> nodeExecutionStatuses, NativeArray<BehaviorRepeatRuntimeState> repeatStates, NativeArray<BehaviorTimeLimitRuntimeState> timeLimitStates, NativeArray<BehaviorActionRuntimeState> actionStates, in BehaviorTickBakedInput baked, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext executingContext, NativeArray<ExternalServiceCompletionRecord> completionRingSnapshot, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter)”
C#
public static BitQuirky.Behavior.Execution.BehaviorTickStepResult TickOne(ref BitQuirky.Behavior.Execution.BehaviorRuntimeInstance instance, Unity.Collections.NativeArray<byte> blackboard, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.ReactiveConditionRuntimeState> reactiveConditionStates, Unity.Collections.NativeArray<BitQuirky.Behavior.Diagnostics.BehaviorNodeExecutionStatus> nodeExecutionStatuses, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorRepeatRuntimeState> repeatStates, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorTimeLimitRuntimeState> timeLimitStates, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorActionRuntimeState> actionStates, in BitQuirky.Behavior.Execution.BehaviorTickBakedInput baked, UnityEngine.EntityId entityId, int frameNumber, float deltaSeconds, in BitQuirky.Behavior.Authority.AuthorityContext executingContext, Unity.Collections.NativeArray<BitQuirky.Behavior.ExternalService.ExternalServiceCompletionRecord> completionRingSnapshot, Unity.Collections.NativeQueue<BitQuirky.Behavior.ExternalService.ExternalServiceCommand>.ParallelWriter commandWriter)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:525-559

Advance one agent with every persistent runtime table, including direct state actions.

TickOne(ref BehaviorRuntimeInstance instance, NativeArray<byte> blackboard, NativeArray<ReactiveConditionRuntimeState> reactiveConditionStates, NativeArray<BehaviorNodeExecutionStatus> nodeExecutionStatuses, NativeArray<BehaviorRepeatRuntimeState> repeatStates, NativeArray<BehaviorTimeLimitRuntimeState> timeLimitStates, NativeArray<BehaviorActionRuntimeState> actionStates, NativeArray<BehaviorStateSuspensionFrame> suspensionFrames, NativeArray<BehaviorActionRuntimeState> suspendedActionStates, NativeArray<BehaviorReferenceRuntimeState> referenceStates, in BehaviorTickBakedInput baked, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext executingContext, NativeArray<ExternalServiceCompletionRecord> completionRingSnapshot, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter)

Section titled “TickOne(ref BehaviorRuntimeInstance instance, NativeArray<byte> blackboard, NativeArray<ReactiveConditionRuntimeState> reactiveConditionStates, NativeArray<BehaviorNodeExecutionStatus> nodeExecutionStatuses, NativeArray<BehaviorRepeatRuntimeState> repeatStates, NativeArray<BehaviorTimeLimitRuntimeState> timeLimitStates, NativeArray<BehaviorActionRuntimeState> actionStates, NativeArray<BehaviorStateSuspensionFrame> suspensionFrames, NativeArray<BehaviorActionRuntimeState> suspendedActionStates, NativeArray<BehaviorReferenceRuntimeState> referenceStates, in BehaviorTickBakedInput baked, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext executingContext, NativeArray<ExternalServiceCompletionRecord> completionRingSnapshot, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter)”
C#
public static BitQuirky.Behavior.Execution.BehaviorTickStepResult TickOne(ref BitQuirky.Behavior.Execution.BehaviorRuntimeInstance instance, Unity.Collections.NativeArray<byte> blackboard, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.ReactiveConditionRuntimeState> reactiveConditionStates, Unity.Collections.NativeArray<BitQuirky.Behavior.Diagnostics.BehaviorNodeExecutionStatus> nodeExecutionStatuses, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorRepeatRuntimeState> repeatStates, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorTimeLimitRuntimeState> timeLimitStates, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorActionRuntimeState> actionStates, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorStateSuspensionFrame> suspensionFrames, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorActionRuntimeState> suspendedActionStates, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorReferenceRuntimeState> referenceStates, in BitQuirky.Behavior.Execution.BehaviorTickBakedInput baked, UnityEngine.EntityId entityId, int frameNumber, float deltaSeconds, in BitQuirky.Behavior.Authority.AuthorityContext executingContext, Unity.Collections.NativeArray<BitQuirky.Behavior.ExternalService.ExternalServiceCompletionRecord> completionRingSnapshot, Unity.Collections.NativeQueue<BitQuirky.Behavior.ExternalService.ExternalServiceCommand>.ParallelWriter commandWriter)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:562-632

Advance one agent with preallocated Push suspension storage.

TickOne(ref BehaviorRuntimeInstance instance, NativeArray<byte> blackboard, NativeArray<ReactiveConditionRuntimeState> reactiveConditionStates, NativeArray<BehaviorNodeExecutionStatus> nodeExecutionStatuses, NativeArray<BehaviorTimeLimitRuntimeState> timeLimitStates, in BehaviorTickBakedInput baked, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext executingContext, NativeArray<ExternalServiceCompletionRecord> completionRingSnapshot, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter)

Section titled “TickOne(ref BehaviorRuntimeInstance instance, NativeArray<byte> blackboard, NativeArray<ReactiveConditionRuntimeState> reactiveConditionStates, NativeArray<BehaviorNodeExecutionStatus> nodeExecutionStatuses, NativeArray<BehaviorTimeLimitRuntimeState> timeLimitStates, in BehaviorTickBakedInput baked, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext executingContext, NativeArray<ExternalServiceCompletionRecord> completionRingSnapshot, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter)”
C#
public static BitQuirky.Behavior.Execution.BehaviorTickStepResult TickOne(ref BitQuirky.Behavior.Execution.BehaviorRuntimeInstance instance, Unity.Collections.NativeArray<byte> blackboard, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.ReactiveConditionRuntimeState> reactiveConditionStates, Unity.Collections.NativeArray<BitQuirky.Behavior.Diagnostics.BehaviorNodeExecutionStatus> nodeExecutionStatuses, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorTimeLimitRuntimeState> timeLimitStates, in BitQuirky.Behavior.Execution.BehaviorTickBakedInput baked, UnityEngine.EntityId entityId, int frameNumber, float deltaSeconds, in BitQuirky.Behavior.Authority.AuthorityContext executingContext, Unity.Collections.NativeArray<BitQuirky.Behavior.ExternalService.ExternalServiceCompletionRecord> completionRingSnapshot, Unity.Collections.NativeQueue<BitQuirky.Behavior.ExternalService.ExternalServiceCommand>.ParallelWriter commandWriter)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:456-484

Advance one agent with persistent reactive, execution-status, and Time Limit state.

Category: Low-level runtime

C#
readonly struct BitQuirky.Behavior.Execution.BehaviorTickBakedInput

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:73-303

The immutable, per-graph baked tables one tick step reads. Bundling them into one value lets the single Burst-callable TickOnecore serve every caller: the batched BehaviorTickJob(which builds this from its shared [ReadOnly] table fields, fed by BehaviorTickContext.BakedInput), theSamples~/ToyGraphdriver, and the EditMode suites (which build it from aBakedBehaviorArtifact).

Responsibilities:

  • Hold the shared read-only node/transition/blackboard/authority tables and the graph’s root/entry indices as a single blittable value, copyable into a Burst job without managed allocation.

Does NOT:

  • Own the native arrays: they belong to the baked artifact (or the entity binding that references it); this is a non-owning view.
  • Carry per-agent state: the instance and blackboard are separate.

C#
public readonly int AnyStateNodeIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:136

Baked node index of the optional Any State plate, or -1 when the graph has none.

C#
public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedAuthorityEntry> AuthorityTable

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:111

One owner-authority row per blackboard field, so the authority gate can scan ownership alone.

C#
public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedBlackboardSlot> BlackboardLayout

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:109

One slot per blackboard field - type code, byte offset, size, and owning authority - describing the layout of the blackboard byte array the step reads and writes.

C#
public readonly Unity.Collections.NativeArray<int> EmitServiceIds

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:126

Flattened emitted-service ids, addressed by each node’s emit range.

C#
public readonly int EntryStateIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:134

Baked node index of the state a statechart activates first; for a behavior tree it equals RootNodeIndex, and it is -1 when the bake found none.

C#
public readonly int ExecutionStepLimit

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:138

Maximum node steps one tick may take; values of zero or less are treated as one. A tick that exhausts the limit faults the machine with ExecutionLimitExceeded instead of looping.

C#
public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedHostedResultEventCondition> HostedResultEventConditions

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:99

Hosted terminal-result event conditions addressed by transitions.

C#
public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedInterruptibleServiceRequirement> InterruptibleServiceRequirements

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:123-124

Service capabilities required by the reactive condition definitions.

C#
public readonly Unity.Collections.NativeArray<int> MemberOperationByNode

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:130

Member operation row per baked node index, or -1 .

C#
public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedMemberOperation> MemberOperations

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:128

Append-only baked member operation table .

C#
public readonly Unity.Collections.NativeArray<byte> NativeDefaultBytes

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:107

Authored blackboard defaults in the blackboard’s own byte layout, empty when the graph declares none. Initialization copies them; a tick step never writes them.

C#
public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedNode> Nodes

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:76

The graph’s baked nodes in bake order; every node index in this view and on the agent’s runtime instance addresses this table. Read but never written by a tick.

C#
public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedNodeParameter> Parameters

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:119

Dense semantic node parameter table.

C#
public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedReactiveCondition> ReactiveConditions

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:121

Deterministically ordered reactive condition definitions.

C#
public readonly Unity.Collections.NativeArray<int> ReadFieldIds

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:113

Flattened read sets: one stable field id hash per entry, addressed by each node’s read range.

C#
public readonly int RootNodeIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:132

Baked node index the graph starts from, or -1 when the bake resolved no root.

C#
public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateActionList> StateActionLists

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:89

One ordered direct-action lifecycle group per state that owns actions; each row addresses a range of StateActionNodeIndices.

C#
public readonly Unity.Collections.NativeArray<int> StateActionNodeIndices

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:91

Baked node indices of state-owned direct actions, flattened in authored edge order and addressed by the StateActionLists ranges.

C#
public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateHostedBehavior> StateHostedBehaviors

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:93

State-owned hosted behavior tree lifecycle rows .

C#
public readonly Unity.Collections.NativeArray<int> StateIndexByNode

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:97

State-row index per baked node, or -1 for non-state nodes.

C#
public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachineCandidate> StateMachineCandidates

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:105

Ordered candidate rows of every referenced-machine node, in the order eligibility is evaluated.

C#
public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachineReference> StateMachineReferences

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:103

Referenced-machine nodes and the candidate range each one owns in StateMachineCandidates.

C#
public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachine> StateMachines

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:101

Dense composed machine rows; row zero is the authoring host machine.

C#
public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Nodes.State.StatechartState> StatechartStates

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:95

Dense authoritative row for every state node.

C#
public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedTransitionCondition> TransitionConditions

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:82

Every transition and candidate eligibility predicate, addressed by the condition range of the transition or candidate row that owns it.

C#
public readonly Unity.Collections.NativeArray<byte> TransitionConstantBytes

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:87

Deterministic constant bytes of every transition predicate whose declared operand is wider than the row’s eight-byte constant column .

C#
public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedTransition> Transitions

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:78

Every state transition, ordered by source state then authored order, so row order is evaluation priority.

C#
public readonly Unity.Collections.NativeArray<int> WaitsServiceIds

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:117

Flattened awaited-service ids, addressed by each node’s waits range.

C#
public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedWeightedChild> WeightedChildren

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:80

Weighted children of every Probability Selector, addressed by the owning selector node’s weighted-child range.

C#
public readonly Unity.Collections.NativeArray<int> WriteFieldIds

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:115

Flattened write sets: one stable field id hash per entry, addressed by each node’s write range.

BehaviorTickBakedInput(NativeArray<BakedNode> nodes, NativeArray<BakedTransition> transitions, NativeArray<BakedWeightedChild> weightedChildren, NativeArray<BakedTransitionCondition> transitionConditions, NativeArray<BakedBlackboardSlot> blackboardLayout, NativeArray<BakedAuthorityEntry> authorityTable, NativeArray<int> readFieldIds, NativeArray<int> writeFieldIds, NativeArray<int> waitsServiceIds, NativeArray<int> emitServiceIds, NativeArray<BakedNodeParameter> parameters, NativeArray<BakedReactiveCondition> reactiveConditions, NativeArray<BakedInterruptibleServiceRequirement> interruptibleServiceRequirements, NativeArray<BakedMemberOperation> memberOperations, NativeArray<int> memberOperationByNode, NativeArray<BakedStateActionList> stateActionLists, NativeArray<int> stateActionNodeIndices, NativeArray<BakedStateHostedBehavior> stateHostedBehaviors, NativeArray<StatechartState> statechartStates, NativeArray<int> stateIndexByNode, NativeArray<BakedHostedResultEventCondition> hostedResultEventConditions, NativeArray<byte> transitionConstantBytes, int rootNodeIndex, int entryStateIndex, int anyStateNodeIndex, int executionStepLimit)

Section titled “BehaviorTickBakedInput(NativeArray<BakedNode> nodes, NativeArray<BakedTransition> transitions, NativeArray<BakedWeightedChild> weightedChildren, NativeArray<BakedTransitionCondition> transitionConditions, NativeArray<BakedBlackboardSlot> blackboardLayout, NativeArray<BakedAuthorityEntry> authorityTable, NativeArray<int> readFieldIds, NativeArray<int> writeFieldIds, NativeArray<int> waitsServiceIds, NativeArray<int> emitServiceIds, NativeArray<BakedNodeParameter> parameters, NativeArray<BakedReactiveCondition> reactiveConditions, NativeArray<BakedInterruptibleServiceRequirement> interruptibleServiceRequirements, NativeArray<BakedMemberOperation> memberOperations, NativeArray<int> memberOperationByNode, NativeArray<BakedStateActionList> stateActionLists, NativeArray<int> stateActionNodeIndices, NativeArray<BakedStateHostedBehavior> stateHostedBehaviors, NativeArray<StatechartState> statechartStates, NativeArray<int> stateIndexByNode, NativeArray<BakedHostedResultEventCondition> hostedResultEventConditions, NativeArray<byte> transitionConstantBytes, int rootNodeIndex, int entryStateIndex, int anyStateNodeIndex, int executionStepLimit)”
C#
public BehaviorTickBakedInput(Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedNode> nodes, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedTransition> transitions, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedWeightedChild> weightedChildren, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedTransitionCondition> transitionConditions, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedBlackboardSlot> blackboardLayout, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedAuthorityEntry> authorityTable, Unity.Collections.NativeArray<int> readFieldIds, Unity.Collections.NativeArray<int> writeFieldIds, Unity.Collections.NativeArray<int> waitsServiceIds, Unity.Collections.NativeArray<int> emitServiceIds, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedNodeParameter> parameters, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedReactiveCondition> reactiveConditions, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedInterruptibleServiceRequirement> interruptibleServiceRequirements, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedMemberOperation> memberOperations, Unity.Collections.NativeArray<int> memberOperationByNode, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateActionList> stateActionLists, Unity.Collections.NativeArray<int> stateActionNodeIndices, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateHostedBehavior> stateHostedBehaviors, Unity.Collections.NativeArray<BitQuirky.Behavior.Nodes.State.StatechartState> statechartStates, Unity.Collections.NativeArray<int> stateIndexByNode, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedHostedResultEventCondition> hostedResultEventConditions, Unity.Collections.NativeArray<byte> transitionConstantBytes, int rootNodeIndex, int entryStateIndex, int anyStateNodeIndex, int executionStepLimit)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:145-203

Creates the complete baked view with the authoritative per-state lookup tables. Hosts normally useFromArtifactso compatibility is resolved once before this Burst-facing view is created.

BehaviorTickBakedInput(NativeArray<BakedNode> nodes, NativeArray<BakedTransition> transitions, NativeArray<BakedWeightedChild> weightedChildren, NativeArray<BakedTransitionCondition> transitionConditions, NativeArray<BakedBlackboardSlot> blackboardLayout, NativeArray<BakedAuthorityEntry> authorityTable, NativeArray<int> readFieldIds, NativeArray<int> writeFieldIds, NativeArray<int> waitsServiceIds, NativeArray<int> emitServiceIds, NativeArray<BakedNodeParameter> parameters, NativeArray<BakedReactiveCondition> reactiveConditions, NativeArray<BakedInterruptibleServiceRequirement> interruptibleServiceRequirements, NativeArray<BakedMemberOperation> memberOperations, NativeArray<int> memberOperationByNode, NativeArray<BakedStateActionList> stateActionLists, NativeArray<int> stateActionNodeIndices, NativeArray<BakedStateHostedBehavior> stateHostedBehaviors, NativeArray<StatechartState> statechartStates, NativeArray<int> stateIndexByNode, NativeArray<BakedHostedResultEventCondition> hostedResultEventConditions, NativeArray<byte> transitionConstantBytes, NativeArray<BakedStateMachine> stateMachines, NativeArray<BakedStateMachineReference> stateMachineReferences, NativeArray<BakedStateMachineCandidate> stateMachineCandidates, NativeArray<byte> nativeDefaultBytes, int rootNodeIndex, int entryStateIndex, int anyStateNodeIndex, int executionStepLimit)

Section titled “BehaviorTickBakedInput(NativeArray<BakedNode> nodes, NativeArray<BakedTransition> transitions, NativeArray<BakedWeightedChild> weightedChildren, NativeArray<BakedTransitionCondition> transitionConditions, NativeArray<BakedBlackboardSlot> blackboardLayout, NativeArray<BakedAuthorityEntry> authorityTable, NativeArray<int> readFieldIds, NativeArray<int> writeFieldIds, NativeArray<int> waitsServiceIds, NativeArray<int> emitServiceIds, NativeArray<BakedNodeParameter> parameters, NativeArray<BakedReactiveCondition> reactiveConditions, NativeArray<BakedInterruptibleServiceRequirement> interruptibleServiceRequirements, NativeArray<BakedMemberOperation> memberOperations, NativeArray<int> memberOperationByNode, NativeArray<BakedStateActionList> stateActionLists, NativeArray<int> stateActionNodeIndices, NativeArray<BakedStateHostedBehavior> stateHostedBehaviors, NativeArray<StatechartState> statechartStates, NativeArray<int> stateIndexByNode, NativeArray<BakedHostedResultEventCondition> hostedResultEventConditions, NativeArray<byte> transitionConstantBytes, NativeArray<BakedStateMachine> stateMachines, NativeArray<BakedStateMachineReference> stateMachineReferences, NativeArray<BakedStateMachineCandidate> stateMachineCandidates, NativeArray<byte> nativeDefaultBytes, int rootNodeIndex, int entryStateIndex, int anyStateNodeIndex, int executionStepLimit)”
C#
public BehaviorTickBakedInput(Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedNode> nodes, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedTransition> transitions, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedWeightedChild> weightedChildren, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedTransitionCondition> transitionConditions, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedBlackboardSlot> blackboardLayout, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedAuthorityEntry> authorityTable, Unity.Collections.NativeArray<int> readFieldIds, Unity.Collections.NativeArray<int> writeFieldIds, Unity.Collections.NativeArray<int> waitsServiceIds, Unity.Collections.NativeArray<int> emitServiceIds, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedNodeParameter> parameters, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedReactiveCondition> reactiveConditions, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedInterruptibleServiceRequirement> interruptibleServiceRequirements, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedMemberOperation> memberOperations, Unity.Collections.NativeArray<int> memberOperationByNode, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateActionList> stateActionLists, Unity.Collections.NativeArray<int> stateActionNodeIndices, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateHostedBehavior> stateHostedBehaviors, Unity.Collections.NativeArray<BitQuirky.Behavior.Nodes.State.StatechartState> statechartStates, Unity.Collections.NativeArray<int> stateIndexByNode, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedHostedResultEventCondition> hostedResultEventConditions, Unity.Collections.NativeArray<byte> transitionConstantBytes, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachine> stateMachines, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachineReference> stateMachineReferences, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachineCandidate> stateMachineCandidates, Unity.Collections.NativeArray<byte> nativeDefaultBytes, int rootNodeIndex, int entryStateIndex, int anyStateNodeIndex, int executionStepLimit)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:210-253

Creates the complete baked view and additionally supplies the referenced state-machine tables and the native default-value bytes. Delegates every shared argument to the primary constructor.

FromArtifact(BakedBehaviorArtifact artifact)

Section titled “FromArtifact(BakedBehaviorArtifact artifact)”
C#
public static BitQuirky.Behavior.Execution.BehaviorTickBakedInput FromArtifact(BitQuirky.Behavior.Baked.BakedBehaviorArtifact artifact)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:260-302

Build the input from a managed baked artifact. Off the Burst path (composition-root, sample, and test setup); the resulting value is then copied into the tick.

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.BehaviorTickContext

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:615-644

Implements: IComponentData

World-singleton context the system reads each frame. The host loop updates this before calling OnUpdate.

C#
public bool IsValid { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:643

Gets whether the context carries both a completion-ring snapshot and a baked node table. OnUpdate ticks nothing while this is false.

C#
public BitQuirky.Behavior.Execution.BehaviorTickBakedInput BakedInput

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:632

The shared baked graph tables the batched tick reads, published by the host on the main thread. The tick job takes these as [ReadOnly]fields rather than from a per-agent component, because a component that itself holds native containers cannot be read inside a job. Feature 008 runs a single shared enemy graph; per-agent heterogeneous graphs are feature 027.

C#
public Unity.Collections.NativeQueue<BitQuirky.Behavior.ExternalService.ExternalServiceCommand>.ParallelWriter CommandQueueWriter

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:622

Parallel writer every ticking agent posts its external service commands to; the host drains the queue on the main thread after this system runs.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.ExternalService.ExternalServiceCompletionRecord> CompletionRingSnapshot

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:620

Completion records the host published for this frame. The tick scans them to resume nodes awaiting external work, matching on entity, command, and service id.

C#
public BitQuirky.Behavior.Execution.BehaviorTickDebugDecisions DebugDecisions

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:640

Per-follower-id debug decisions the host may publish for Feature 014 pause / step. Missing keys mean “tick normally” so agents without a debug control entry are unaffected.IsCreated is false when unwired.

C#
public BitQuirky.Behavior.Authority.AuthorityContext ExecutingContext

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:618

The role this process ticks as; the runtime gate refuses any node whose declared authority does not match it.

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.BehaviorTickDebugDecision

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:604-608

Per-follower debug-tick decision the host publishes through BehaviorTickDebugDecisions. ShouldTick offalsemeans “skip the tick this frame”.

Responsibilities:

  • Hold the smallest amount of state the burst-side tick loop needs to honour pause + step (one bool per follower id).

Does NOT:

  • Carry the step credit itself: the host runtime decrements that on its own dictionary after the system runs.

C#
public bool ShouldTick

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:607

True when this follower should tick this frame.

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.BehaviorTickDebugDecisions

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:652-675

Lightweight handle wrapping aNativeParallelHashMap'2 of follower ids toBehaviorTickDebugDecisionso the tick system can read it without taking a dependency on the host runtime’s full debug control surface.

C#
public bool IsCreated { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:658

Gets whether the host has published a decision map.

C#
public Unity.Collections.NativeParallelHashMap<int, BitQuirky.Behavior.Execution.BehaviorTickDebugDecision> Map

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:655

Host-owned map from follower id to decision; a default (uncreated) map means every follower ticks.

C#
public bool ShouldTick(int followerId)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:666-674

Decides whether one follower may tick this frame. Returns true when no map has been published or the follower has no entry, so agents the host is not pausing or stepping are unaffected.

Parameters

  • followerId: Host-defined id taken from FollowerId.

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.BehaviorTickJob

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:69-254

Implements: IJobEntity

The legacy-compatible batched, Burst-compiled non-reactive behavior-graph tick. One ScheduleParalleladvances every agent in the query for a single simulation frame:BehaviorTickSystemschedules this job once and each agent’s step runs on a worker thread, so there is no per-agent schedule/complete sync point and no per-agent temporary allocation . Every agent’s step is delegated to the sharedTickOnecore, so the batched path, theSamples~/ToyGraphdriver, and the EditMode suites execute byte-for-byte identical node / statechart / external-service semantics (, Principle III).

The shared baked tables are carried as[ReadOnly]array fields, not read from a per-agent component: a component that itself contains native containers is illegal to access inside a job (the Jobs Debugger rejects it, which is the CI condition), so the tables come from the world-singletonBakedInputthat the host publishes on the main thread. The query requires BehaviorRuntimeTickIdentityas the job-safe opt-in marker and source of the follower id. Feature 008 drives a single shared enemy graph; per-agent heterogeneous graphs are feature 027.

Responsibilities:

  • Resolve each agent’s blackboardDynamicBuffer'1in place (zero-copy viaReinterpret''1) and tick exactly one step per agent through the shared core.

Does NOT:

  • Allocate per-agent scratch memory: the blackboard is read and written in the entity chunk; commands go to a shared parallel writer.
  • Drain the External Service Command Queue: the host does that after the tick’s dependency resolves.
  • Require the additive reactive-condition buffer from entities whose graph has no reactive abort observers.
  • Parse Mermaid or mutate consumer gameplay data directly.

C#
public int AnyStateNodeIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:127

Baked node index of the optional Any State plate, or -1 when the graph has none.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedAuthorityEntry> AuthorityTable

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:99

One owner-authority row per blackboard field, so the authority gate can scan ownership alone.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedBlackboardSlot> BlackboardLayout

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:97

One slot per blackboard field - type code, byte offset, size, and owning authority - describing the layout of each agent’s blackboard bytes.

C#
public Unity.Collections.NativeQueue<BitQuirky.Behavior.ExternalService.ExternalServiceCommand>.ParallelWriter CommandWriter

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:153

Append-only command queue parallel writer, shared across agents.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.ExternalService.ExternalServiceCompletionRecord> CompletionRingSnapshot

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:138

Completion records the host published for this frame, valid for this tick only. The tick scans them to resume nodes awaiting external work, matching on entity, command, and service id.

C#
public Unity.Collections.NativeParallelHashMap<int, BitQuirky.Behavior.Execution.BehaviorTickDebugDecision> DebugDecisionMap

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:144

Host-published pause and step decisions keyed by FollowerId; an agent with no entry ticks normally. Read only while HasDebugDecisions is non-zero.

C#
public float DeltaSeconds

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:142

Simulation time elapsed since the previous tick, in seconds; node elapsed timers and Time Limit decorators accumulate it.

C#
public Unity.Collections.NativeArray<int> EmitServiceIds

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:121

Flattened emitted-service ids, addressed by each node’s emit range.

C#
public int EntryStateIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:125

Baked node index of the state a statechart activates first; for a behavior tree it equals RootNodeIndex, and it is -1 when the bake found none.

C#
public BitQuirky.Behavior.Authority.AuthorityContext ExecutingContext

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:136

The role this process ticks as; the runtime gate refuses any node whose declared authority does not match it.

C#
public int ExecutionStepLimit

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:129

Maximum node steps one agent’s tick may take. A tick that exhausts the limit faults the machine with ExecutionLimitExceeded instead of looping.

C#
public int FrameNumber

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:140

The host’s monotonic simulation frame counter for this tick, stamped onto every emitted command and onto the completion bookkeeping on each instance.

C#
public byte HasDebugDecisions

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:146

Non-zero when the host published a decision map for this frame; zero skips the lookup entirely and every matched agent ticks.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedHostedResultEventCondition> HostedResultEventConditions

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:95

Hosted terminal-result event conditions, each naming the transition row that waits for the event.

C#
public Unity.Collections.NativeArray<int> MemberOperationByNode

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:111

Row index into MemberOperations per baked node index, or -1 when the node binds no member.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedMemberOperation> MemberOperations

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:109

Baked member operations - the calls, reads, and writes nodes make against the customer’s own components - addressed through MemberOperationByNode.

C#
public Unity.Collections.NativeArray<byte> NativeDefaultBytes

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:119

Authored blackboard defaults in the blackboard’s own byte layout, empty when the graph declares none. Only agent initialization copies them; a tick never writes them.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedNode> Nodes

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:75

The shared graph’s baked nodes in bake order, read-only for the whole tick; every node index this job and each agent’s runtime instance carry addresses this table.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedNodeParameter> Parameters

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:107

Dense semantic node parameters, addressed by each node’s parameter range.

C#
public Unity.Collections.NativeArray<int> ReadFieldIds

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:101

Flattened read sets: one stable field id hash per entry, addressed by each node’s read range.

C#
public int RootNodeIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:123

Baked node index the shared graph starts from, or -1 when the bake resolved no root.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateActionList> StateActionLists

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:85

One ordered direct-action lifecycle group per state that owns actions; each row addresses a range of StateActionNodeIndices.

C#
public Unity.Collections.NativeArray<int> StateActionNodeIndices

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:87

Baked node indices of state-owned direct actions, flattened in authored edge order and addressed by the StateActionLists ranges.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateHostedBehavior> StateHostedBehaviors

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:89

One row per state that owns a hosted behavior tree, naming the hosted root node and the lifecycle contract applied to its terminal result.

C#
public Unity.Collections.NativeArray<int> StateIndexByNode

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:93

Row index into StatechartStates per baked node index, or -1 for nodes that are not states.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachineCandidate> StateMachineCandidates

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:117

Ordered candidate rows of every referenced-machine node, in the order eligibility is evaluated.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachineReference> StateMachineReferences

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:115

Referenced-machine nodes and the candidate range each one owns in StateMachineCandidates.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachine> StateMachines

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:113

Dense composed machine rows; row zero is the authoring host machine.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Nodes.State.StatechartState> StatechartStates

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:91

Dense state row for every baked state node, reached through StateIndexByNode.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedTransitionCondition> TransitionConditions

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:81

Every transition and candidate eligibility predicate, addressed by the condition range of the transition or candidate row that owns it.

C#
public Unity.Collections.NativeArray<byte> TransitionConstantBytes

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:83

Constants of transition predicates too wide for a condition row’s eight-byte column, addressed by that row’s constant byte range.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedTransition> Transitions

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:77

Every state transition of the shared graph, ordered by source state then authored order, so row order is evaluation priority.

C#
public Unity.Collections.NativeArray<int> WaitsServiceIds

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:105

Flattened awaited-service ids, addressed by each node’s waits range.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedWeightedChild> WeightedChildren

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:79

Weighted children of every Probability Selector, addressed by the owning selector node’s weighted-child range.

C#
public Unity.Collections.NativeArray<int> WriteFieldIds

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:103

Flattened write sets: one stable field id hash per entry, addressed by each node’s write range.

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.BehaviorTickStepResult

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:38-48

Result of one tick step over a single agent’s runtime instance. The step emits commands into the External Service Command Queue and updates the runtime instance in place; this struct is returned to the caller for diagnostic / test inspection.

Responsibilities:

Does NOT:

  • Own any native memory or need disposal: it is a POD snapshot.

C#
public BitQuirky.Behavior.Execution.BehaviorResultCode Code

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:41

Result the step ended on: Running while the graph still has work, a terminal code when the walk finished, and None when nothing was eligible to run.

C#
public int CurrentNodeIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:43

Active baked-node index after the step, mirroring the instance cursor; -1 when the step left no node scheduled.

C#
public int CurrentStateIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:45

Baked-node index of the active top-level statechart state after the step, or -1 when no state is active.

C#
public BitQuirky.Behavior.Execution.BehaviorMachineResult MachineResult

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:47

Explicit final machine result, or None while the machine remains active.

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.BehaviorTickSystem

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:68-480

Implements: ISystem

ECS system that drives everyBehaviorRuntimeInstance component on an agent entity through one tick step per simulation frame with a single batched parallel schedule. One BehaviorTickJobor its additive reactive counterpart advances the whole query across the worker pool, replacing the former per-agent schedule-then-complete loop: no per-agent sync point, no per-agent temporary allocation, zero managed allocation on the tick path .

Responsibilities:

  • Read the world-singletonBehaviorTickContext(executing authority context, completion-ring snapshot, command-queue parallel writer, command-id counter, debug decisions) and hand it to the batched job, without copying per-agent.
  • Restrict ticking to explicitly bound agents: a BehaviorRuntimeTickIdentityopts the entity into this graph context and supplies the job-safe follower id used by debug pause / step decisions.
  • Schedule the batched tick once, flow the dependency into Dependency, and resolve it with a single frame-level barrier (never per-agent) so the host’s main-thread external-service drain, which reads the command queue and completion ring this job wrote, sees settled data.

Does NOT:

  • Manage adapter lifecycle (that is the concern of the host FollowerBehaviorRuntimeGameLogic in Layer 3).
  • Drain the External Service Command Queue: the host does that after this system, on the main thread.
  • Parse Mermaid (FR-012f).
  • Mutate consumer gameplay data directly: node side effects flow through the command queue and are decoded by Layer 3 adapters.

The system is updated in the simulation group; the host loop is responsible for running adapter drain immediately after.

C#
public void OnCreate(ref Unity.Entities.SystemState state)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:92-132

Allocates the persistent empty debug-decision map used when the host publishes none, and builds the queries that backfill per-agent runtime buffers. Called once by the ECS world; hosts never call it directly.

C#
public void OnDestroy(ref Unity.Entities.SystemState state)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:138-144

Releases the empty debug-decision map allocated byOnCreate. Called once by the ECS world when the system is torn down.

C#
public void OnUpdate(ref Unity.Entities.SystemState state)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:158-280

Advances every bound agent by one tick, using the world’s delta time in seconds. Returns without ticking anything while the world holds no valid BehaviorTickContextsingleton. Otherwise it increments this system’s own frame counter, backfills and resizes the per-agent runtime buffers to the artifact’s node and referenced-machine counts, schedules one batched parallel job across every entity carryingBehaviorRuntimeInstance, BehaviorRuntimeTickIdentity, and a blackboard buffer, and completes that job before returning, so the host’s main-thread external-service drain sees settled command-queue and completion-ring writes. Called by the ECS world once per simulation frame.

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.BehaviorTimeLimitRuntimeState

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:354-367

Persistent elapsed state for one baked Time Limit decorator, indexed by its baked node.

Responsibilities:

  • Retain the decorator’s own elapsed seconds while its subtree remains active, including across completed sibling children and beneath another Time Limit.
  • Distinguish a newly entered decorator from one whose active subtree is continuing.
  • Remember the last host frame that advanced the clock so immediate same-frame microsteps cannot consume the selected tick twice.

Does NOT:

  • Decide timeout outcomes, sample a clock, or retain elapsed time after the decorator’s subtree is no longer active.

C#
public float ElapsedSeconds

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:357

Elapsed selected-tick seconds since this decorator became active.

C#
public byte HasAdvancedFrame

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:366

Whether LastAdvancedFrameNumber contains a valid frame.

C#
public byte IsActive

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:363

Whether the decorator was on the active subtree path on the prior tick.

C#
public int LastAdvancedFrameNumber

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:360

The host frame that most recently advanced this decorator’s clock.

Category: Low-level runtime

C#
enum BitQuirky.Behavior.Execution.BehaviorTraceTier

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:41-48

Underlying type: byte

Trace verbosity tier for a single follower’s runtime instance. Maps to the always-on / high-detail tier split described in data-model.md §Behavior Trace. Defaults to AlwaysOn; the high-detail tier is opt-in by id and stripped from shipping builds.

C#
AlwaysOn = 0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:44

The default tier, recorded in every build.

C#
HighDetail = 1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:47

The opt-in per-instance tier, stripped from shipping builds.

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.PendingExternalSlot

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:127-148

One outstanding pending-external slot on a runtime instance. The runtime instance owns up toMaxPendingExternals of these so the tick job can resume on completion ring records without managed allocation.

C#
public int CommandId

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:133

Runtime-issued command id this slot resumes on; FindPendingByCommand matches completion records against it.

C#
public int FrameIssued

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:137

Host frame on which the request was posted.

C#
public byte InUse

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:141

One while this slot holds an outstanding request; zero marks it free for TryReservePendingSlot.

C#
public int OwningNodeIndex

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:139

Baked node index that owns the request, or -1 when the issuing caller named no node.

C#
public int PendingId

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:135

Service-side request id reported by the wrapped service, which need not equal CommandId.

C#
public byte Reserved0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:143

Reserved byte kept zero for additive binary evolution.

C#
public byte Reserved1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:145

Reserved byte kept zero for additive binary evolution.

C#
public byte Reserved2

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:147

Reserved byte kept zero for additive binary evolution.

C#
public int ServiceId

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:131

Stable service-id hash of the external service the outstanding request was posted to.

Category: Low-level runtime

C#
struct BitQuirky.Behavior.Execution.ReactiveConditionRuntimeState

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:453-470

Per-agent state for one artifact-indexed reactive condition.

Responsibilities:

  • Retain the last observed status and whether an observation has occurred.

Does NOT:

  • Own native memory or identify a baked condition independently of its array index.

C#
public byte HasObservation

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:460

One after the observer has produced its first status.

C#
public BitQuirky.Behavior.Nodes.BehaviorNodeStatus LastStatus

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:457

Most recent status returned by this condition observer.

C#
public byte Reserved0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:463

Reserved byte kept zero for additive binary evolution.

C#
public byte Reserved1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:466

Reserved byte kept zero for additive binary evolution.

C#
public byte Reserved2

Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:469

Reserved byte kept zero for additive binary evolution.

Source fingerprint: sha256:ad0983d00d773d882bc61865e18d8c5559e009d181e5891575cd7f262515b23e

Full-size image