BitQuirky.Behavior.Execution
Public behavior trees and state machines: runtime symbols in BitQuirky.Behavior.Execution.
Source snapshot ad0983d00d77.
On this page
Assembly: BitQuirky.Behavior.Runtime
BehaviorActionLifecycleRuntimeState
Section titled “BehaviorActionLifecycleRuntimeState”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorActionLifecycleRuntimeStateSource 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.
Members
Section titled “Members”Inactive
Section titled “Inactive”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.
EntryStatus
Section titled “EntryStatus”public BitQuirky.Behavior.Diagnostics.BehaviorNodeExecutionStatus EntryStatusSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:273
Structured Entry group result.
ExitBudgetRemaining
Section titled “ExitBudgetRemaining”public byte ExitBudgetRemainingSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:306
One while a nonempty Exit still owes its sole evaluation.
ExitStatus
Section titled “ExitStatus”public BitQuirky.Behavior.Diagnostics.BehaviorNodeExecutionStatus ExitStatusSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:279
Structured Exit group result.
FinishArmed
Section titled “FinishArmed”public byte FinishArmedSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:288
One while an On Finish transition may observe a held Once result.
HasLatchedDestination
Section titled “HasLatchedDestination”public byte HasLatchedDestinationSource 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.
IterationBoundaryPending
Section titled “IterationBoundaryPending”public byte IterationBoundaryPendingSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:291
One only until the current pass boundary has had its On Iteration evaluation.
LatchedDestinationStateIndex
Section titled “LatchedDestinationStateIndex”public int LatchedDestinationStateIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:300
Chosen destination state, or -1 outside a handoff.
PendingMachineFaultCode
Section titled “PendingMachineFaultCode”public BitQuirky.Behavior.Execution.BehaviorResultCode PendingMachineFaultCodeSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:297
Exact fault code retained when PendingMachineResult is Faulted.
PendingMachineResult
Section titled “PendingMachineResult”public BitQuirky.Behavior.Execution.BehaviorMachineResult PendingMachineResultSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:294
Final result waiting for the state’s bounded Exit update.
public BitQuirky.Behavior.Baked.BakedActionPhase PhaseSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:270
Lifecycle group the shared scheduler selected for the active state.
Reserved0
Section titled “Reserved0”public byte Reserved0Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:315
Reserved byte kept zero for additive binary evolution.
Reserved1
Section titled “Reserved1”public byte Reserved1Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:318
Reserved byte kept zero for additive binary evolution.
TransitionFrame
Section titled “TransitionFrame”public int TransitionFrameSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:303
Update that latched the destination, or -1 before handoff.
UpdatePass
Section titled “UpdatePass”public uint UpdatePassSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:282
One-based Active Update pass identity; zero before the first pass.
UpdateResult
Section titled “UpdateResult”public BitQuirky.Behavior.Execution.BehaviorResultCode UpdateResultSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:285
Exact result produced by the most recently completed Active Update pass.
UpdateStatus
Section titled “UpdateStatus”public BitQuirky.Behavior.Diagnostics.BehaviorNodeExecutionStatus UpdateStatusSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:276
Structured Active Update group result.
BehaviorActionRuntimeState
Section titled “BehaviorActionRuntimeState”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorActionRuntimeStateSource 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.
Members
Section titled “Members”ActivationGeneration
Section titled “ActivationGeneration”public uint ActivationGenerationSource 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.
CancellationIssued
Section titled “CancellationIssued”public byte CancellationIssuedSource 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.
CommandId
Section titled “CommandId”public int CommandIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:172
Runtime-issued command id the outstanding request and its completion record are matched on.
CompletedFrame
Section titled “CompletedFrame”public int CompletedFrameSource 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.
FrameIssued
Section titled “FrameIssued”public int FrameIssuedSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:176
Host frame on which the request was posted.
IsPending
Section titled “IsPending”public byte IsPendingSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:166
One while the action awaits an external service completion identified by CommandId.
Reserved0
Section titled “Reserved0”public byte Reserved0Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:170
Reserved byte kept zero for additive binary evolution.
Result
Section titled “Result”public BitQuirky.Behavior.Execution.BehaviorResultCode ResultSource 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.
ServiceId
Section titled “ServiceId”public int ServiceIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:174
Stable service-id hash of the service the outstanding request was posted to.
BehaviorInterruptionRecord
Section titled “BehaviorInterruptionRecord”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorInterruptionRecordSource 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.
Members
Section titled “Members”CauseNodeIndex
Section titled “CauseNodeIndex”public int CauseNodeIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:488
Baked condition node that caused the interruption.
FrameNumber
Section titled “FrameNumber”public int FrameNumberSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:494
Selected frame in which the interruption occurred.
InterruptedNodeIndex
Section titled “InterruptedNodeIndex”public int InterruptedNodeIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:485
Baked node whose Running work was interrupted.
IsValid
Section titled “IsValid”public byte IsValidSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:500
One when this record contains an observed interruption.
Reserved0
Section titled “Reserved0”public byte Reserved0Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:503
Reserved byte kept zero for additive binary evolution.
Reserved1
Section titled “Reserved1”public byte Reserved1Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:506
Reserved byte kept zero for additive binary evolution.
Reserved2
Section titled “Reserved2”public byte Reserved2Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:509
Reserved byte kept zero for additive binary evolution.
Result
Section titled “Result”public BitQuirky.Behavior.Execution.BehaviorResultCode ResultSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:491
Observable result recorded for the interrupted node.
Sequence
Section titled “Sequence”public uint SequenceSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:497
Per-agent monotonic interruption sequence.
BehaviorMachineResult
Section titled “BehaviorMachineResult”Category: Low-level runtime
enum BitQuirky.Behavior.Execution.BehaviorMachineResultSource 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.
Members
Section titled “Members”Failure
Section titled “Failure”Failure = 2Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:111
The machine reached an authored failure terminal.
Faulted
Section titled “Faulted”Faulted = 3Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:114
The machine stopped on a runtime fault, never on an authored Failure outcome.
None = 0Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:105
The machine is still running or deliberately staying; it has no final result yet.
Success
Section titled “Success”Success = 1Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:108
The machine reached an authored success terminal.
BehaviorMemberRequestSlot
Section titled “BehaviorMemberRequestSlot”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorMemberRequestSlotSource 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.
Members
Section titled “Members”CompletionCode
Section titled “CompletionCode”public BitQuirky.Behavior.Execution.BehaviorResultCode CompletionCodeSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:435
Exact behavior result the host wrote after servicing an immediate request.
NodeIndex
Section titled “NodeIndex”public int NodeIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:423
Owning baked node index of the requested operation; -1 when none.
OperationIndex
Section titled “OperationIndex”public int OperationIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:420
Baked member operation row the core requested; -1 when none.
Reserved0
Section titled “Reserved0”public byte Reserved0Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:429
Reserved byte kept zero for additive binary evolution.
Reserved1
Section titled “Reserved1”public ushort Reserved1Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:432
Reserved word kept zero for additive binary evolution.
Reserved2
Section titled “Reserved2”public byte Reserved2Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:438
Reserved byte kept zero for additive binary evolution.
Reserved3
Section titled “Reserved3”public ushort Reserved3Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:441
Reserved word kept zero for additive binary evolution.
public BitQuirky.Behavior.Execution.BehaviorMemberRequestState StateSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:426
Channel lifecycle state.
BehaviorMemberRequestState
Section titled “BehaviorMemberRequestState”Category: Low-level runtime
enum BitQuirky.Behavior.Execution.BehaviorMemberRequestStateSource 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.
Members
Section titled “Members”Completed
Section titled “Completed”Completed = 2Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:397
The host serviced the request; the core consumes the exact completion code.
None = 0Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:391
No immediate member operation is outstanding.
Requested
Section titled “Requested”Requested = 1Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:394
The shared core requested an immediate member operation the host must service.
BehaviorNestedMachinePhase
Section titled “BehaviorNestedMachinePhase”Category: Low-level runtime
enum BitQuirky.Behavior.Execution.BehaviorNestedMachinePhaseSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:515-534
Underlying type: byte
Stable lifecycle phase of a referenced machine activation.
Members
Section titled “Members”Faulted
Section titled “Faulted”Faulted = 5Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:533
The nested machine stopped on a runtime fault.
Finished
Section titled “Finished”Finished = 4Source 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.
None = 0Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:518
No referenced machine is active on this instance.
Parked
Section titled “Parked”Parked = 1Source 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.
Running
Section titled “Running”Running = 3Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:527
The selected candidate machine is executing.
Selecting
Section titled “Selecting”Selecting = 2Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:524
The reference is choosing which saved candidate to activate; no nested machine runs yet.
BehaviorReactiveConditionState
Section titled “BehaviorReactiveConditionState”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorReactiveConditionStateSource 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.
Members
Section titled “Members”public BitQuirky.Behavior.Execution.ReactiveConditionRuntimeState ValueSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1329
Shared-core observer state stored for this artifact table row.
BehaviorReferencePhase
Section titled “BehaviorReferencePhase”Category: Low-level runtime
enum BitQuirky.Behavior.Execution.BehaviorReferencePhaseSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:184-203
Underlying type: byte
Persistent lifecycle phase of one baked state-machine reference.
Members
Section titled “Members”Faulted
Section titled “Faulted”Faulted = 5Source 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.
Finished
Section titled “Finished”Finished = 4Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:199
The nested machine completed and its result is retained for inspection.
Outside
Section titled “Outside”Outside = 0Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:187
Execution has left the reference entirely and returned to the containing machine.
Parked
Section titled “Parked”Parked = 1Source 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.
Running
Section titled “Running”Running = 2Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:193
A selected candidate machine is currently executing inside the reference.
Suspended
Section titled “Suspended”Suspended = 3Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:196
A Push transition suspended the reference; its cursor is retained for the eventual return.
BehaviorReferenceRuntimeState
Section titled “BehaviorReferenceRuntimeState”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorReferenceRuntimeStateSource 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.
Members
Section titled “Members”Outside
Section titled “Outside”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.
ActiveMachineIndex
Section titled “ActiveMachineIndex”public int ActiveMachineIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:222
Composed state-machine table row the selected candidate resolves to, or -1.
ActiveStateIndex
Section titled “ActiveStateIndex”public int ActiveStateIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:224
Baked node index of the state the reference was last observed in, or -1.
CandidateNodeIndex
Section titled “CandidateNodeIndex”public int CandidateNodeIndexSource 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.
HostActionLifecycle
Section titled “HostActionLifecycle”public BitQuirky.Behavior.Execution.BehaviorActionLifecycleRuntimeState HostActionLifecycleSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:237
Owning reference-state lifecycle retained while its child machine runs.
HostTransitionIndex
Section titled “HostTransitionIndex”public int HostTransitionIndexSource 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.
HostTransitionTick
Section titled “HostTransitionTick”public int HostTransitionTickSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:234
Host frame paired with HostTransitionIndex, or -1.
public BitQuirky.Behavior.Execution.BehaviorReferencePhase PhaseSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:226
Lifecycle phase this reference was left in.
Result
Section titled “Result”public BitQuirky.Behavior.Execution.BehaviorMachineResult ResultSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:228
Terminal result of the referenced machine, or None while it is still running.
ResultTick
Section titled “ResultTick”public int ResultTickSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:230
Host frame that recorded Result, or -1 before the machine completes.
BehaviorRepeatRuntimeState
Section titled “BehaviorRepeatRuntimeState”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorRepeatRuntimeStateSource 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.
Members
Section titled “Members”IterationsCompleted
Section titled “IterationsCompleted”public int IterationsCompletedSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:382
Completed child attempts in the current structural activation.
BehaviorResultCode
Section titled “BehaviorResultCode”Category: Low-level runtime
enum BitQuirky.Behavior.Execution.BehaviorResultCodeSource 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.
Members
Section titled “Members”AuthorityHandoff
Section titled “AuthorityHandoff”AuthorityHandoff = 8Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:84
The node’s outstanding external request was cancelled by an authority handoff.
AuthorityMismatch
Section titled “AuthorityMismatch”AuthorityMismatch = 7Source 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.
Blocked
Section titled “Blocked”Blocked = 5Source 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.
ExecutionLimitExceeded
Section titled “ExecutionLimitExceeded”ExecutionLimitExceeded = 11Source 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.
ExternalServiceRefused
Section titled “ExternalServiceRefused”ExternalServiceRefused = 9Source 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.
Failure
Section titled “Failure”Failure = 3Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:69
The node completed unsuccessfully as authored.
Faulted
Section titled “Faulted”Faulted = 12Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:95
A configuration or runtime fault, never an authored Failure outcome.
Interrupted
Section titled “Interrupted”Interrupted = 4Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:72
The node was cancelled before it settled, most often by a latched transition.
None = 0Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:60
No result has been recorded for this activation yet.
Running
Section titled “Running”Running = 1Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:63
The node is still working and is resumed on the next tick.
SubgraphError
Section titled “SubgraphError”SubgraphError = 10Source 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.
Success
Section titled “Success”Success = 2Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:66
The node completed successfully.
Timeout
Section titled “Timeout”Timeout = 6Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:78
A deferred invocation gave up after its time budget elapsed.
BehaviorRuntimeArtifactBinding
Section titled “BehaviorRuntimeArtifactBinding”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorRuntimeArtifactBindingSource 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.
Members
Section titled “Members”IsValid
Section titled “IsValid”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.
AnyStateNodeIndex
Section titled “AnyStateNodeIndex”public int AnyStateNodeIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:552
Baked node index of the optional Any State plate, or -1 when absent.
AuthorityTable
Section titled “AuthorityTable”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedAuthorityEntry> AuthorityTableSource 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.
BlackboardLayout
Section titled “BlackboardLayout”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedBlackboardSlot> BlackboardLayoutSource 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.
EmitServiceIds
Section titled “EmitServiceIds”public Unity.Collections.NativeArray<int> EmitServiceIdsSource 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.
EntryStateIndex
Section titled “EntryStateIndex”public int EntryStateIndexSource 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.
ExecutionStepLimit
Section titled “ExecutionStepLimit”public int ExecutionStepLimitSource 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.
FollowerId
Section titled “FollowerId”public int FollowerIdSource 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.
HostedResultEventConditions
Section titled “HostedResultEventConditions”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedHostedResultEventCondition> HostedResultEventConditionsSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:511
Hosted terminal-result event conditions that transitions address by index.
InterruptibleServiceRequirements
Section titled “InterruptibleServiceRequirements”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedInterruptibleServiceRequirement> InterruptibleServiceRequirementsSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:545-546
Service capabilities required by the reactive condition definitions.
MemberOperationByNode
Section titled “MemberOperationByNode”public Unity.Collections.NativeArray<int> MemberOperationByNodeSource 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.
MemberOperations
Section titled “MemberOperations”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedMemberOperation> MemberOperationsSource 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.
NativeDefaultBytes
Section titled “NativeDefaultBytes”public Unity.Collections.NativeArray<byte> NativeDefaultBytesSource 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.
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedNode> NodesSource 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.
Parameters
Section titled “Parameters”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedNodeParameter> ParametersSource 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.
ReactiveConditions
Section titled “ReactiveConditions”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedReactiveCondition> ReactiveConditionsSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:543
Deterministically ordered reactive condition definitions.
ReadFieldIds
Section titled “ReadFieldIds”public Unity.Collections.NativeArray<int> ReadFieldIdsSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:529
Flattened read-set field id hashes, addressed by each node’s (ReadFieldStart, ReadFieldCount) range.
RootNodeIndex
Section titled “RootNodeIndex”public int RootNodeIndexSource 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.
StateActionLists
Section titled “StateActionLists”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateActionList> StateActionListsSource 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.
StateActionNodeIndices
Section titled “StateActionNodeIndices”public Unity.Collections.NativeArray<int> StateActionNodeIndicesSource 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.
StateHostedBehaviors
Section titled “StateHostedBehaviors”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateHostedBehavior> StateHostedBehaviorsSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:509
Lifecycle rows for state-owned hosted behavior trees.
StateIndexByNode
Section titled “StateIndexByNode”public Unity.Collections.NativeArray<int> StateIndexByNodeSource 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.
StateMachineCandidates
Section titled “StateMachineCandidates”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachineCandidate> StateMachineCandidatesSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:517
Ordered candidate rows for every referenced-machine node.
StateMachineReferences
Section titled “StateMachineReferences”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachineReference> StateMachineReferencesSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:515
Referenced-machine nodes, each naming a (CandidateStart, CandidateCount) range into StateMachineCandidates.
StateMachines
Section titled “StateMachines”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachine> StateMachinesSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:513
Composed state-machine rows; row zero is the host machine.
StatechartStates
Section titled “StatechartStates”public Unity.Collections.NativeArray<BitQuirky.Behavior.Nodes.State.StatechartState> StatechartStatesSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:521
One dense row per baked state node, reached through StateIndexByNode.
TransitionConditions
Section titled “TransitionConditions”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedTransitionCondition> TransitionConditionsSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:500
Transition predicate rows, addressed by each transition’s (ConditionStart, ConditionCount) range.
TransitionConstantBytes
Section titled “TransitionConstantBytes”public Unity.Collections.NativeArray<byte> TransitionConstantBytesSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:503
Deterministic wide constants of declared transition operands .
Transitions
Section titled “Transitions”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedTransition> TransitionsSource 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.
WaitsServiceIds
Section titled “WaitsServiceIds”public Unity.Collections.NativeArray<int> WaitsServiceIdsSource 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.
WeightedChildren
Section titled “WeightedChildren”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedWeightedChild> WeightedChildrenSource 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.
WriteFieldIds
Section titled “WriteFieldIds”public Unity.Collections.NativeArray<int> WriteFieldIdsSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:531
Flattened write-set field id hashes, addressed by each node’s (WriteFieldStart, WriteFieldCount) range.
BehaviorRuntimeBlackboardByte
Section titled “BehaviorRuntimeBlackboardByte”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorRuntimeBlackboardByteSource 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.
Members
Section titled “Members”public byte ValueSource 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)”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.
op_Implicit(byte v)
Section titled “op_Implicit(byte v)”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.
BehaviorRuntimeInstance
Section titled “BehaviorRuntimeInstance”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorRuntimeInstanceSource 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).
Members
Section titled “Members”ActionActivationGeneration
Section titled “ActionActivationGeneration”public uint ActionActivationGenerationSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:903
Monotonic activation generation for direct state action lists.
ActionLifecycle
Section titled “ActionLifecycle”public BitQuirky.Behavior.Execution.BehaviorActionLifecycleRuntimeState ActionLifecycleSource 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.
ActiveDecoratorNodeIndex
Section titled “ActiveDecoratorNodeIndex”public int ActiveDecoratorNodeIndexSource 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.
ActiveMachineIndex
Section titled “ActiveMachineIndex”public int ActiveMachineIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:729
Active composed-machine row; zero is the host machine.
ActiveNestedReferenceNodeIndex
Section titled “ActiveNestedReferenceNodeIndex”public int ActiveNestedReferenceNodeIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:714
Requested frame capacity when a Push could not fit this tick.
ActiveProbabilitySelectorIndex
Section titled “ActiveProbabilitySelectorIndex”public int ActiveProbabilitySelectorIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:783
Active probability selector, or -1 when no weighted selection is active.
ActiveStateMachineCandidateIndex
Section titled “ActiveStateMachineCandidateIndex”public int ActiveStateMachineCandidateIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:723
Selected referenced-machine candidate node, or -1 while parked/outside.
ActiveStateMachineReferenceIndex
Section titled “ActiveStateMachineReferenceIndex”public int ActiveStateMachineReferenceIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:720
Referenced-machine node currently executing, or -1 outside a reference.
AuthorityContextId
Section titled “AuthorityContextId”public BitQuirky.Behavior.Baked.BakedAuthorityContext AuthorityContextIdSource 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.
CompositeChildCursor
Section titled “CompositeChildCursor”public int CompositeChildCursorSource 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.
CurrentNodeElapsedSeconds
Section titled “CurrentNodeElapsedSeconds”public float CurrentNodeElapsedSecondsSource 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.
CurrentNodeIndex
Section titled “CurrentNodeIndex”public int CurrentNodeIndexSource 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).
CurrentStateIndex
Section titled “CurrentStateIndex”public int CurrentStateIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:705
Active top-level statechart state’s baked-node index.
DecoratorIterationsCompleted
Section titled “DecoratorIterationsCompleted”public int DecoratorIterationsCompletedSource 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.
DeepestExecutedNodeIndex
Section titled “DeepestExecutedNodeIndex”public int DeepestExecutedNodeIndexSource 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.
GraphContentHash
Section titled “GraphContentHash”public ulong GraphContentHashSource 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).
GraphId
Section titled “GraphId”public int GraphIdSource 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.
HostedCompletedCycleCount
Section titled “HostedCompletedCycleCount”public int HostedCompletedCycleCountSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:940
Terminal hosted cycles completed sinceHostedStateIndexwas entered.
HostedEventPending
Section titled “HostedEventPending”public byte HostedEventPendingSource 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.
HostedLastCycleFrame
Section titled “HostedLastCycleFrame”public int HostedLastCycleFrameSource 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.
HostedLifetime
Section titled “HostedLifetime”public BitQuirky.Behavior.Baked.BakedHostedBehaviorLifetime HostedLifetimeSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:961
Baked lifetime of the hosted tree owned byHostedStateIndex. An omitted authored lifetime bakes toRepeat.
HostedReserved0
Section titled “HostedReserved0”public byte HostedReserved0Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:973
Alignment padding that keeps the hosted cursor four-byte aligned.
HostedResultCode
Section titled “HostedResultCode”public BitQuirky.Behavior.Execution.BehaviorResultCode HostedResultCodeSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:964
Terminal result of the latest hosted cycle, or None.
HostedResultEventId
Section titled “HostedResultEventId”public int HostedResultEventIdSource 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.
HostedResultTick
Section titled “HostedResultTick”public int HostedResultTickSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:949
Input tick that produced the held hosted result, or -1 before completion.
HostedStateIndex
Section titled “HostedStateIndex”public int HostedStateIndexSource 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 .
InitialRandomSeed
Section titled “InitialRandomSeed”public uint InitialRandomSeedSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:773
Seed supplied when this runtime instance was created.
LastEvaluatedTransitionPredicateId
Section titled “LastEvaluatedTransitionPredicateId”public int LastEvaluatedTransitionPredicateIdSource 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.
LastEvaluatedTransitionRightFieldId
Section titled “LastEvaluatedTransitionRightFieldId”public int LastEvaluatedTransitionRightFieldIdSource 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.
LastInterruption
Section titled “LastInterruption”public BitQuirky.Behavior.Execution.BehaviorInterruptionRecord LastInterruptionSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:855
Latest structured branch interruption, if one has occurred.
LastProbabilitySelectorIndex
Section titled “LastProbabilitySelectorIndex”public int LastProbabilitySelectorIndexSource 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.
LastResultCode
Section titled “LastResultCode”public BitQuirky.Behavior.Execution.BehaviorResultCode LastResultCodeSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:835
Result of the most recent step, stamped by RecordLastResult; None before the first tick.
LastTickedFrame
Section titled “LastTickedFrame”public int LastTickedFrameSource 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.
LastTransitionCauseId
Section titled “LastTransitionCauseId”public int LastTransitionCauseIdSource 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.
LastTransitionFrame
Section titled “LastTransitionFrame”public int LastTransitionFrameSource 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.
LastTransitionId
Section titled “LastTransitionId”public int LastTransitionIdSource 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.
MachineFinished
Section titled “MachineFinished”public byte MachineFinishedSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:740
One after terminal completion, including Return with no suspended caller.
MachineResult
Section titled “MachineResult”public BitQuirky.Behavior.Execution.BehaviorMachineResult MachineResultSource 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.
MaxPendingExternals
Section titled “MaxPendingExternals”public const int MaxPendingExternals = 4Source 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.
MemberActivationGeneration
Section titled “MemberActivationGeneration”public uint MemberActivationGenerationSource 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 .
MemberRequest
Section titled “MemberRequest”public BitQuirky.Behavior.Execution.BehaviorMemberRequestSlot MemberRequestSource 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 .
NestedMachinePhase
Section titled “NestedMachinePhase”public BitQuirky.Behavior.Execution.BehaviorNestedMachinePhase NestedMachinePhaseSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:735
Stable lifecycle phase of the active/last referenced machine.
NestedMachineResult
Section titled “NestedMachineResult”public BitQuirky.Behavior.Execution.BehaviorMachineResult NestedMachineResultSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:732
Final result of the most recently completed nested machine.
NextCommandId
Section titled “NextCommandId”public int NextCommandIdSource 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.
Pending0
Section titled “Pending0”public BitQuirky.Behavior.Execution.PendingExternalSlot Pending0Source 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.
Pending1
Section titled “Pending1”public BitQuirky.Behavior.Execution.PendingExternalSlot Pending1Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:889
Pending-external slot 1.
Pending2
Section titled “Pending2”public BitQuirky.Behavior.Execution.PendingExternalSlot Pending2Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:891
Pending-external slot 2.
Pending3
Section titled “Pending3”public BitQuirky.Behavior.Execution.PendingExternalSlot Pending3Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:893
Pending-external slot 3.
ProbabilityCandidateMask
Section titled “ProbabilityCandidateMask”public ulong ProbabilityCandidateMaskSource 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.
RandomState
Section titled “RandomState”public uint RandomStateSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:778
Current deterministic pseudo-random state for probability nodes.
ReferenceActivationGeneration
Section titled “ReferenceActivationGeneration”public uint ReferenceActivationGenerationSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:726
Monotonic identity of the latest referenced-machine candidate activation.
ReferenceParked
Section titled “ReferenceParked”public byte ReferenceParkedSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:737
One while a reference is parked because no candidate is eligible.
RepeatRestartedThisFrame
Section titled “RepeatRestartedThisFrame”public byte RepeatRestartedThisFrameSource 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.
RepeatRestartedThisFrameNumber
Section titled “RepeatRestartedThisFrameNumber”public int RepeatRestartedThisFrameNumberSource 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.
RequiredSuspendedActionCapacity
Section titled “RequiredSuspendedActionCapacity”public int RequiredSuspendedActionCapacitySource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:718
Requested sparse action capacity when a Push could not fit this tick.
RequiredSuspensionFrameCapacity
Section titled “RequiredSuspensionFrameCapacity”public int RequiredSuspensionFrameCapacitySource 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.
Reserved0
Section titled “Reserved0”public byte Reserved0Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:847
Reserved byte kept zero for additive binary evolution.
SelectedProbabilityChildIndex
Section titled “SelectedProbabilityChildIndex”public int SelectedProbabilityChildIndexSource 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.
SuspendedActionStateCount
Section titled “SuspendedActionStateCount”public int SuspendedActionStateCountSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:711
Used rows in the sparse suspended-action pool.
SuspensionDepth
Section titled “SuspensionDepth”public int SuspensionDepthSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:708
Number of preserved Push activations beneath the active state.
TraceTier
Section titled “TraceTier”public BitQuirky.Behavior.Execution.BehaviorTraceTier TraceTierSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:843
Trace verbosity this instance publishes; ForReplacement carries it forward.
CancelAllPending()
Section titled “CancelAllPending()”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.
ClearHostedCursor()
Section titled “ClearHostedCursor()”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.
EnterLatchedState(int newStateIndex)
Section titled “EnterLatchedState(int newStateIndex)”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.
FindPendingByCommand(int commandId)
Section titled “FindPendingByCommand(int commandId)”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)”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)”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)”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.
GetPending(int slotIndex)
Section titled “GetPending(int slotIndex)”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)”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)”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)”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.
ReleasePendingSlot(int slotIndex)
Section titled “ReleasePendingSlot(int slotIndex)”public void ReleasePendingSlot(int slotIndex)Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:1215-1218
Free a pending slot.
ReserveCommandId()
Section titled “ReserveCommandId()”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)”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)”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.
BehaviorRuntimeTickIdentity
Section titled “BehaviorRuntimeTickIdentity”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorRuntimeTickIdentitySource 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:
- Mark an agent as eligible for the batched tick.
- Carry the host-defined follower id used to consult BehaviorTickDebugDecisions.
Does NOT:
- Carry baked graph tables or blackboard storage.
- Define entity lifetime or stable service identity; commands and
completions use
EntityIdfor that.
Members
Section titled “Members”FollowerId
Section titled “FollowerId”public int FollowerIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:588
Host-defined id used by debug pause / step decisions.
BehaviorStateSuspensionFrame
Section titled “BehaviorStateSuspensionFrame”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorStateSuspensionFrameSource 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.
Members
Section titled “Members”ActionActivationGeneration
Section titled “ActionActivationGeneration”public uint ActionActivationGenerationSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:569
Saved action activation generation, so completions issued before the Push still match on return.
ActionLifecycle
Section titled “ActionLifecycle”public BitQuirky.Behavior.Execution.BehaviorActionLifecycleRuntimeState ActionLifecycleSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:571
Saved Entry, Active Update, and Exit lifecycle progress of the suspended state.
ActiveDecoratorNodeIndex
Section titled “ActiveDecoratorNodeIndex”public int ActiveDecoratorNodeIndexSource 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.
ActiveMachineIndex
Section titled “ActiveMachineIndex”public int ActiveMachineIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:603
Saved composed-machine row; zero is the host machine.
ActiveNestedReferenceNodeIndex
Section titled “ActiveNestedReferenceNodeIndex”public int ActiveNestedReferenceNodeIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:597
Saved composed reference node, including hidden nested references, or -1.
ActiveProbabilitySelectorIndex
Section titled “ActiveProbabilitySelectorIndex”public int ActiveProbabilitySelectorIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:561
Saved active weighted selector node index, or -1.
ActiveStateMachineCandidateIndex
Section titled “ActiveStateMachineCandidateIndex”public int ActiveStateMachineCandidateIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:601
Saved selected referenced-machine candidate node index, or -1.
ActiveStateMachineReferenceIndex
Section titled “ActiveStateMachineReferenceIndex”public int ActiveStateMachineReferenceIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:599
Saved referenced-machine table row, or -1.
CompositeChildCursor
Section titled “CompositeChildCursor”public int CompositeChildCursorSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:548
Saved composite child cursor of the suspended activation.
CurrentNodeElapsedSeconds
Section titled “CurrentNodeElapsedSeconds”public float CurrentNodeElapsedSecondsSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:559
Saved seconds the suspended cursor had been ticking.
CurrentNodeIndex
Section titled “CurrentNodeIndex”public int CurrentNodeIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:546
Saved active node index, restored verbatim when execution returns to this frame.
DecoratorIterationsCompleted
Section titled “DecoratorIterationsCompleted”public int DecoratorIterationsCompletedSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:550
Saved Repeat decorator iteration count of the suspended activation.
HostedCompletedCycleCount
Section titled “HostedCompletedCycleCount”public int HostedCompletedCycleCountSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:575
Saved count of terminal hosted cycles completed in the suspended state.
HostedEventPending
Section titled “HostedEventPending”public byte HostedEventPendingSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:587
Saved flag for a hosted result event that still owes its single transition evaluation.
HostedLastCycleFrame
Section titled “HostedLastCycleFrame”public int HostedLastCycleFrameSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:577
Saved frame of the latest terminal hosted cycle, or -1.
HostedLifetime
Section titled “HostedLifetime”public BitQuirky.Behavior.Baked.BakedHostedBehaviorLifetime HostedLifetimeSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:583
Saved baked lifetime of the suspended hosted tree.
HostedResultCode
Section titled “HostedResultCode”public BitQuirky.Behavior.Execution.BehaviorResultCode HostedResultCodeSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:585
Saved terminal result of the latest hosted cycle, or None.
HostedResultEventId
Section titled “HostedResultEventId”public int HostedResultEventIdSource 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.
HostedResultTick
Section titled “HostedResultTick”public int HostedResultTickSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:579
Saved input tick that produced the held hosted result, or -1.
HostedStateIndex
Section titled “HostedStateIndex”public int HostedStateIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:573
Saved owner of the suspended activation’s hosted behavior tree, or -1.
LastProbabilitySelectorIndex
Section titled “LastProbabilitySelectorIndex”public int LastProbabilitySelectorIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:563
Saved last weighted selector node index, or -1.
NestedMachinePhase
Section titled “NestedMachinePhase”public BitQuirky.Behavior.Execution.BehaviorNestedMachinePhase NestedMachinePhaseSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:607
Saved lifecycle phase of the active or last referenced machine.
NestedMachineResult
Section titled “NestedMachineResult”public BitQuirky.Behavior.Execution.BehaviorMachineResult NestedMachineResultSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:605
Saved final result of the most recently completed nested machine.
OnReturn
Section titled “OnReturn”public BitQuirky.Behavior.Nodes.State.StateTransitionOnReturn OnReturnSource 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.
Pending0
Section titled “Pending0”public BitQuirky.Behavior.Execution.PendingExternalSlot Pending0Source 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.
Pending1
Section titled “Pending1”public BitQuirky.Behavior.Execution.PendingExternalSlot Pending1Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:591
Saved pending-external slot 1.
Pending2
Section titled “Pending2”public BitQuirky.Behavior.Execution.PendingExternalSlot Pending2Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:593
Saved pending-external slot 2.
Pending3
Section titled “Pending3”public BitQuirky.Behavior.Execution.PendingExternalSlot Pending3Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:595
Saved pending-external slot 3.
ProbabilityCandidateMask
Section titled “ProbabilityCandidateMask”public ulong ProbabilityCandidateMaskSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:567
Saved eligible weighted children, addressed by authored child order.
ReferenceParked
Section titled “ReferenceParked”public byte ReferenceParkedSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:609
Saved parked flag for a reference whose candidates were all ineligible.
Reserved
Section titled “Reserved”public ushort ReservedSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:613
Alignment padding kept zero for additive binary evolution.
SelectedProbabilityChildIndex
Section titled “SelectedProbabilityChildIndex”public int SelectedProbabilityChildIndexSource 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.
StateIndex
Section titled “StateIndex”public int StateIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:544
Baked node index of the state this Push suspended.
SuspendedActionCount
Section titled “SuspendedActionCount”public int SuspendedActionCountSource 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.
SuspendedActionStart
Section titled “SuspendedActionStart”public int SuspendedActionStartSource 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.
BehaviorTick
Section titled “BehaviorTick”Category: Low-level runtime
class BitQuirky.Behavior.Execution.BehaviorTickSource 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.
Members
Section titled “Members”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)”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)”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)”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)”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)”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)”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)”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)”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)”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)”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)”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)”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)”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)”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)”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)”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.
BehaviorTickBakedInput
Section titled “BehaviorTickBakedInput”Category: Low-level runtime
readonly struct BitQuirky.Behavior.Execution.BehaviorTickBakedInputSource 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.
Members
Section titled “Members”AnyStateNodeIndex
Section titled “AnyStateNodeIndex”public readonly int AnyStateNodeIndexSource 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.
AuthorityTable
Section titled “AuthorityTable”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedAuthorityEntry> AuthorityTableSource 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.
BlackboardLayout
Section titled “BlackboardLayout”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedBlackboardSlot> BlackboardLayoutSource 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.
EmitServiceIds
Section titled “EmitServiceIds”public readonly Unity.Collections.NativeArray<int> EmitServiceIdsSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:126
Flattened emitted-service ids, addressed by each node’s emit range.
EntryStateIndex
Section titled “EntryStateIndex”public readonly int EntryStateIndexSource 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.
ExecutionStepLimit
Section titled “ExecutionStepLimit”public readonly int ExecutionStepLimitSource 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.
HostedResultEventConditions
Section titled “HostedResultEventConditions”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedHostedResultEventCondition> HostedResultEventConditionsSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:99
Hosted terminal-result event conditions addressed by transitions.
InterruptibleServiceRequirements
Section titled “InterruptibleServiceRequirements”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedInterruptibleServiceRequirement> InterruptibleServiceRequirementsSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:123-124
Service capabilities required by the reactive condition definitions.
MemberOperationByNode
Section titled “MemberOperationByNode”public readonly Unity.Collections.NativeArray<int> MemberOperationByNodeSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:130
Member operation row per baked node index, or -1 .
MemberOperations
Section titled “MemberOperations”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedMemberOperation> MemberOperationsSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:128
Append-only baked member operation table .
NativeDefaultBytes
Section titled “NativeDefaultBytes”public readonly Unity.Collections.NativeArray<byte> NativeDefaultBytesSource 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.
public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedNode> NodesSource 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.
Parameters
Section titled “Parameters”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedNodeParameter> ParametersSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:119
Dense semantic node parameter table.
ReactiveConditions
Section titled “ReactiveConditions”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedReactiveCondition> ReactiveConditionsSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:121
Deterministically ordered reactive condition definitions.
ReadFieldIds
Section titled “ReadFieldIds”public readonly Unity.Collections.NativeArray<int> ReadFieldIdsSource 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.
RootNodeIndex
Section titled “RootNodeIndex”public readonly int RootNodeIndexSource 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.
StateActionLists
Section titled “StateActionLists”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateActionList> StateActionListsSource 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.
StateActionNodeIndices
Section titled “StateActionNodeIndices”public readonly Unity.Collections.NativeArray<int> StateActionNodeIndicesSource 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.
StateHostedBehaviors
Section titled “StateHostedBehaviors”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateHostedBehavior> StateHostedBehaviorsSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:93
State-owned hosted behavior tree lifecycle rows .
StateIndexByNode
Section titled “StateIndexByNode”public readonly Unity.Collections.NativeArray<int> StateIndexByNodeSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:97
State-row index per baked node, or -1 for non-state nodes.
StateMachineCandidates
Section titled “StateMachineCandidates”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachineCandidate> StateMachineCandidatesSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:105
Ordered candidate rows of every referenced-machine node, in the order eligibility is evaluated.
StateMachineReferences
Section titled “StateMachineReferences”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachineReference> StateMachineReferencesSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:103
Referenced-machine nodes and the candidate range each one owns in StateMachineCandidates.
StateMachines
Section titled “StateMachines”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachine> StateMachinesSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:101
Dense composed machine rows; row zero is the authoring host machine.
StatechartStates
Section titled “StatechartStates”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Nodes.State.StatechartState> StatechartStatesSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:95
Dense authoritative row for every state node.
TransitionConditions
Section titled “TransitionConditions”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedTransitionCondition> TransitionConditionsSource 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.
TransitionConstantBytes
Section titled “TransitionConstantBytes”public readonly Unity.Collections.NativeArray<byte> TransitionConstantBytesSource 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 .
Transitions
Section titled “Transitions”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedTransition> TransitionsSource 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.
WaitsServiceIds
Section titled “WaitsServiceIds”public readonly Unity.Collections.NativeArray<int> WaitsServiceIdsSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:117
Flattened awaited-service ids, addressed by each node’s waits range.
WeightedChildren
Section titled “WeightedChildren”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedWeightedChild> WeightedChildrenSource 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.
WriteFieldIds
Section titled “WriteFieldIds”public readonly Unity.Collections.NativeArray<int> WriteFieldIdsSource 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)”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)”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)”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.
BehaviorTickContext
Section titled “BehaviorTickContext”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorTickContextSource 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.
Members
Section titled “Members”IsValid
Section titled “IsValid”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.
BakedInput
Section titled “BakedInput”public BitQuirky.Behavior.Execution.BehaviorTickBakedInput BakedInputSource 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.
CommandQueueWriter
Section titled “CommandQueueWriter”public Unity.Collections.NativeQueue<BitQuirky.Behavior.ExternalService.ExternalServiceCommand>.ParallelWriter CommandQueueWriterSource 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.
CompletionRingSnapshot
Section titled “CompletionRingSnapshot”public Unity.Collections.NativeArray<BitQuirky.Behavior.ExternalService.ExternalServiceCompletionRecord> CompletionRingSnapshotSource 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.
DebugDecisions
Section titled “DebugDecisions”public BitQuirky.Behavior.Execution.BehaviorTickDebugDecisions DebugDecisionsSource 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.
ExecutingContext
Section titled “ExecutingContext”public BitQuirky.Behavior.Authority.AuthorityContext ExecutingContextSource 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.
BehaviorTickDebugDecision
Section titled “BehaviorTickDebugDecision”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorTickDebugDecisionSource 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.
Members
Section titled “Members”ShouldTick
Section titled “ShouldTick”public bool ShouldTickSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:607
True when this follower should tick this frame.
BehaviorTickDebugDecisions
Section titled “BehaviorTickDebugDecisions”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorTickDebugDecisionsSource 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.
Members
Section titled “Members”IsCreated
Section titled “IsCreated”public bool IsCreated { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickSystem.cs:658
Gets whether the host has published a decision map.
public Unity.Collections.NativeParallelHashMap<int, BitQuirky.Behavior.Execution.BehaviorTickDebugDecision> MapSource 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.
ShouldTick(int followerId)
Section titled “ShouldTick(int followerId)”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.
BehaviorTickJob
Section titled “BehaviorTickJob”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorTickJobSource 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 blackboard
DynamicBuffer'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.
Members
Section titled “Members”AnyStateNodeIndex
Section titled “AnyStateNodeIndex”public int AnyStateNodeIndexSource 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.
AuthorityTable
Section titled “AuthorityTable”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedAuthorityEntry> AuthorityTableSource 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.
BlackboardLayout
Section titled “BlackboardLayout”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedBlackboardSlot> BlackboardLayoutSource 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.
CommandWriter
Section titled “CommandWriter”public Unity.Collections.NativeQueue<BitQuirky.Behavior.ExternalService.ExternalServiceCommand>.ParallelWriter CommandWriterSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:153
Append-only command queue parallel writer, shared across agents.
CompletionRingSnapshot
Section titled “CompletionRingSnapshot”public Unity.Collections.NativeArray<BitQuirky.Behavior.ExternalService.ExternalServiceCompletionRecord> CompletionRingSnapshotSource 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.
DebugDecisionMap
Section titled “DebugDecisionMap”public Unity.Collections.NativeParallelHashMap<int, BitQuirky.Behavior.Execution.BehaviorTickDebugDecision> DebugDecisionMapSource 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.
DeltaSeconds
Section titled “DeltaSeconds”public float DeltaSecondsSource 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.
EmitServiceIds
Section titled “EmitServiceIds”public Unity.Collections.NativeArray<int> EmitServiceIdsSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:121
Flattened emitted-service ids, addressed by each node’s emit range.
EntryStateIndex
Section titled “EntryStateIndex”public int EntryStateIndexSource 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.
ExecutingContext
Section titled “ExecutingContext”public BitQuirky.Behavior.Authority.AuthorityContext ExecutingContextSource 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.
ExecutionStepLimit
Section titled “ExecutionStepLimit”public int ExecutionStepLimitSource 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.
FrameNumber
Section titled “FrameNumber”public int FrameNumberSource 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.
HasDebugDecisions
Section titled “HasDebugDecisions”public byte HasDebugDecisionsSource 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.
HostedResultEventConditions
Section titled “HostedResultEventConditions”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedHostedResultEventCondition> HostedResultEventConditionsSource 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.
MemberOperationByNode
Section titled “MemberOperationByNode”public Unity.Collections.NativeArray<int> MemberOperationByNodeSource 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.
MemberOperations
Section titled “MemberOperations”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedMemberOperation> MemberOperationsSource 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.
NativeDefaultBytes
Section titled “NativeDefaultBytes”public Unity.Collections.NativeArray<byte> NativeDefaultBytesSource 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.
public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedNode> NodesSource 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.
Parameters
Section titled “Parameters”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedNodeParameter> ParametersSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:107
Dense semantic node parameters, addressed by each node’s parameter range.
ReadFieldIds
Section titled “ReadFieldIds”public Unity.Collections.NativeArray<int> ReadFieldIdsSource 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.
RootNodeIndex
Section titled “RootNodeIndex”public int RootNodeIndexSource 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.
StateActionLists
Section titled “StateActionLists”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateActionList> StateActionListsSource 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.
StateActionNodeIndices
Section titled “StateActionNodeIndices”public Unity.Collections.NativeArray<int> StateActionNodeIndicesSource 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.
StateHostedBehaviors
Section titled “StateHostedBehaviors”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateHostedBehavior> StateHostedBehaviorsSource 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.
StateIndexByNode
Section titled “StateIndexByNode”public Unity.Collections.NativeArray<int> StateIndexByNodeSource 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.
StateMachineCandidates
Section titled “StateMachineCandidates”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachineCandidate> StateMachineCandidatesSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:117
Ordered candidate rows of every referenced-machine node, in the order eligibility is evaluated.
StateMachineReferences
Section titled “StateMachineReferences”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachineReference> StateMachineReferencesSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:115
Referenced-machine nodes and the candidate range each one owns in StateMachineCandidates.
StateMachines
Section titled “StateMachines”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedStateMachine> StateMachinesSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:113
Dense composed machine rows; row zero is the authoring host machine.
StatechartStates
Section titled “StatechartStates”public Unity.Collections.NativeArray<BitQuirky.Behavior.Nodes.State.StatechartState> StatechartStatesSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:91
Dense state row for every baked state node, reached through StateIndexByNode.
TransitionConditions
Section titled “TransitionConditions”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedTransitionCondition> TransitionConditionsSource 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.
TransitionConstantBytes
Section titled “TransitionConstantBytes”public Unity.Collections.NativeArray<byte> TransitionConstantBytesSource 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.
Transitions
Section titled “Transitions”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedTransition> TransitionsSource 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.
WaitsServiceIds
Section titled “WaitsServiceIds”public Unity.Collections.NativeArray<int> WaitsServiceIdsSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickJob.cs:105
Flattened awaited-service ids, addressed by each node’s waits range.
WeightedChildren
Section titled “WeightedChildren”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedWeightedChild> WeightedChildrenSource 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.
WriteFieldIds
Section titled “WriteFieldIds”public Unity.Collections.NativeArray<int> WriteFieldIdsSource 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.
BehaviorTickStepResult
Section titled “BehaviorTickStepResult”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorTickStepResultSource 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:
- Carry the terminalBehaviorResultCodeand the post-step cursor (CurrentNodeIndex / CurrentStateIndex) so the sample driver and EditMode suites can assert the walk without re-reading the instance.
Does NOT:
- Own any native memory or need disposal: it is a POD snapshot.
Members
Section titled “Members”public BitQuirky.Behavior.Execution.BehaviorResultCode CodeSource 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.
CurrentNodeIndex
Section titled “CurrentNodeIndex”public int CurrentNodeIndexSource 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.
CurrentStateIndex
Section titled “CurrentStateIndex”public int CurrentStateIndexSource 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.
MachineResult
Section titled “MachineResult”public BitQuirky.Behavior.Execution.BehaviorMachineResult MachineResultSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorTickCore.cs:47
Explicit final machine result, or None while the machine remains active.
BehaviorTickSystem
Section titled “BehaviorTickSystem”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorTickSystemSource 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.
Members
Section titled “Members”OnCreate(ref SystemState state)
Section titled “OnCreate(ref SystemState state)”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.
OnDestroy(ref SystemState state)
Section titled “OnDestroy(ref SystemState state)”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.
OnUpdate(ref SystemState state)
Section titled “OnUpdate(ref SystemState state)”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.
BehaviorTimeLimitRuntimeState
Section titled “BehaviorTimeLimitRuntimeState”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorTimeLimitRuntimeStateSource 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.
Members
Section titled “Members”ElapsedSeconds
Section titled “ElapsedSeconds”public float ElapsedSecondsSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:357
Elapsed selected-tick seconds since this decorator became active.
HasAdvancedFrame
Section titled “HasAdvancedFrame”public byte HasAdvancedFrameSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:366
Whether LastAdvancedFrameNumber contains a valid frame.
IsActive
Section titled “IsActive”public byte IsActiveSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:363
Whether the decorator was on the active subtree path on the prior tick.
LastAdvancedFrameNumber
Section titled “LastAdvancedFrameNumber”public int LastAdvancedFrameNumberSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:360
The host frame that most recently advanced this decorator’s clock.
BehaviorTraceTier
Section titled “BehaviorTraceTier”Category: Low-level runtime
enum BitQuirky.Behavior.Execution.BehaviorTraceTierSource 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.
Members
Section titled “Members”AlwaysOn
Section titled “AlwaysOn”AlwaysOn = 0Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:44
The default tier, recorded in every build.
HighDetail
Section titled “HighDetail”HighDetail = 1Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:47
The opt-in per-instance tier, stripped from shipping builds.
PendingExternalSlot
Section titled “PendingExternalSlot”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.PendingExternalSlotSource 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.
Members
Section titled “Members”CommandId
Section titled “CommandId”public int CommandIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:133
Runtime-issued command id this slot resumes on; FindPendingByCommand matches completion records against it.
FrameIssued
Section titled “FrameIssued”public int FrameIssuedSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:137
Host frame on which the request was posted.
public byte InUseSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:141
One while this slot holds an outstanding request; zero marks it free for TryReservePendingSlot.
OwningNodeIndex
Section titled “OwningNodeIndex”public int OwningNodeIndexSource 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.
PendingId
Section titled “PendingId”public int PendingIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:135
Service-side request id reported by the wrapped service, which need not equal CommandId.
Reserved0
Section titled “Reserved0”public byte Reserved0Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:143
Reserved byte kept zero for additive binary evolution.
Reserved1
Section titled “Reserved1”public byte Reserved1Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:145
Reserved byte kept zero for additive binary evolution.
Reserved2
Section titled “Reserved2”public byte Reserved2Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:147
Reserved byte kept zero for additive binary evolution.
ServiceId
Section titled “ServiceId”public int ServiceIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:131
Stable service-id hash of the external service the outstanding request was posted to.
ReactiveConditionRuntimeState
Section titled “ReactiveConditionRuntimeState”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.ReactiveConditionRuntimeStateSource 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.
Members
Section titled “Members”HasObservation
Section titled “HasObservation”public byte HasObservationSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:460
One after the observer has produced its first status.
LastStatus
Section titled “LastStatus”public BitQuirky.Behavior.Nodes.BehaviorNodeStatus LastStatusSource declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:457
Most recent status returned by this condition observer.
Reserved0
Section titled “Reserved0”public byte Reserved0Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:463
Reserved byte kept zero for additive binary evolution.
Reserved1
Section titled “Reserved1”public byte Reserved1Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:466
Reserved byte kept zero for additive binary evolution.
Reserved2
Section titled “Reserved2”public byte Reserved2Source declaration: Packages/io.bitquirky.behavior/Runtime/Execution/BehaviorRuntimeInstance.cs:469
Reserved byte kept zero for additive binary evolution.
Source fingerprint: sha256:ad0983d00d773d882bc61865e18d8c5559e009d181e5891575cd7f262515b23e