BitQuirky.Behavior.Execution
Public behavior trees and state machines: runtime backend symbols in BitQuirky.Behavior.Execution.
Source snapshot 29003d8b1658.
On this page
Assembly: BitQuirky.Behavior.Runtime.Backend
BehaviorHostedStateMachineRuntime
Section titled “BehaviorHostedStateMachineRuntime”Category: Low-level runtime
class BitQuirky.Behavior.Execution.BehaviorHostedStateMachineRuntimeSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorHostedStateMachineRuntime.cs:39-622
Implements: IDisposable
Drives the materialize/tick/release lifecycle of a Hosted State Machine node’s second, independently baked artifact instance (FSM-013), outside the Burst-compiled shared tick core, shared by the GameObject binding, the entity binding, and direct-core tests.
Responsibilities:
- Own the per-activation native storage for at most one concurrently active hosted instance (siblings in a Behavior Tree are mutually exclusive) and the one-slot BehaviorRuntimeInstance/owning-node-index pair passed through BehaviorTick’s hosted-instance overload.
- Advance an already-materialized hosted instance by exactly one tick before the host’s own tick runs, and materialize a freshly activated row (seeding its input blackboard from the host’s then-current values, research.md R3) or release a row the host’s own tick just finished or tore down, immediately after the host’s own tick runs.
- Resolve the referenced artifact’s plain normal completion (a reachable dead end with no outgoing transition and no terminal-event transition firing) to a direct Success result, distinct from an authored terminal-event transition into a mapped state.
Does NOT:
- Resolve a source address to aBakedBehaviorArtifact: the caller supplies an artifact resolver per row.
- Bind member operations, movement, or GameObject components: the GameObject binding layers that on top through its own binding map.
Members
Section titled “Members”ActiveArtifact
Section titled “ActiveArtifact”public BitQuirky.Behavior.Baked.BakedBehaviorArtifact ActiveArtifact { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorHostedStateMachineRuntime.cs:217
Gets the active row’s own artifact, or null when nothing is active.
ActiveBlackboard
Section titled “ActiveBlackboard”public Unity.Collections.NativeArray<byte> ActiveBlackboard { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorHostedStateMachineRuntime.cs:220
Gets the active row’s own blackboard, or an empty array when nothing is active.
ActiveCommandQueue
Section titled “ActiveCommandQueue”public BitQuirky.Behavior.ExternalService.ExternalServiceCommandQueue ActiveCommandQueue { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorHostedStateMachineRuntime.cs:223
Gets the active row’s own command queue, or null when nothing is active.
ActiveCompletionRing
Section titled “ActiveCompletionRing”public BitQuirky.Behavior.ExternalService.ExternalServiceCompletionRing ActiveCompletionRing { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorHostedStateMachineRuntime.cs:226
Gets the active row’s own completion ring, or null when nothing is active.
ActiveMemberRuntime
Section titled “ActiveMemberRuntime”public BitQuirky.Behavior.Member.BehaviorMemberBindingRuntime ActiveMemberRuntime { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorHostedStateMachineRuntime.cs:234
Gets the active row’s own member runtime (created by theCreatefactory at materialization), or null when nothing is active or the active graph has no member operations. Exposed so a GameObject binding can reuse the same instance for input dispatch; this driver already drives its sample/service/push cycle every tick.
HasRows
Section titled “HasRows”public bool HasRows { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorHostedStateMachineRuntime.cs:211
Whether this host graph authors at least one Hosted State Machine node.
InstanceSlot
Section titled “InstanceSlot”public Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorRuntimeInstance> InstanceSlot { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorHostedStateMachineRuntime.cs:205
Gets the one-slot hosted instance the shared tick core reads and writes.
IsActive
Section titled “IsActive”public bool IsActive { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorHostedStateMachineRuntime.cs:214
Whether a hosted instance is currently materialized and active.
OwningNodeIndexSlot
Section titled “OwningNodeIndexSlot”public Unity.Collections.NativeArray<int> OwningNodeIndexSlot { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorHostedStateMachineRuntime.cs:208
Gets the one-slot owning-node-index the shared tick core reads and writes.
AdvanceBeforeHostTick(EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext context)
Section titled “AdvanceBeforeHostTick(EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext context)”public void AdvanceBeforeHostTick(UnityEngine.EntityId entityId, int frameNumber, float deltaSeconds, in BitQuirky.Behavior.Authority.AuthorityContext context)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorHostedStateMachineRuntime.cs:263-276
Advances an already-materialized hosted instance by exactly one tick, skipping a result already terminal and awaiting the host’s own tick to consume it. Call before the host’s own primary tick every update; a no-op while nothing is materialized.
Create(BakedBehaviorArtifact hostArtifact, Func<int, BakedBehaviorArtifact> resolveReferencedArtifact, int graphId, Func<int, BakedBehaviorArtifact, NativeArray<byte>, ExternalServiceCompletionRing, BehaviorMemberBindingRuntime> createMemberRuntime, uint? randomSeed)
Section titled “Create(BakedBehaviorArtifact hostArtifact, Func<int, BakedBehaviorArtifact> resolveReferencedArtifact, int graphId, Func<int, BakedBehaviorArtifact, NativeArray<byte>, ExternalServiceCompletionRing, BehaviorMemberBindingRuntime> createMemberRuntime, uint? randomSeed)”public static BitQuirky.Behavior.Execution.BehaviorHostedStateMachineRuntime Create(BitQuirky.Behavior.Baked.BakedBehaviorArtifact hostArtifact, System.Func<int, BitQuirky.Behavior.Baked.BakedBehaviorArtifact> resolveReferencedArtifact, int graphId = 0, System.Func<int, BitQuirky.Behavior.Baked.BakedBehaviorArtifact, Unity.Collections.NativeArray<byte>, BitQuirky.Behavior.ExternalService.ExternalServiceCompletionRing, BitQuirky.Behavior.Member.BehaviorMemberBindingRuntime> createMemberRuntime = null, uint? randomSeed = null)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorHostedStateMachineRuntime.cs:164-196
Builds a driver for everyBakedHostedStateMachineReferencerow on
hostArtifact; HasRowsis false when it authors none.
resolveReferencedArtifact receives a row index (matching HostedStateMachineReferencesorder) and must return a
freshly materialized artifact the caller owns no further reference to.
createMemberRuntime, when supplied, is called once per fresh
activation with that row’s own index, the newly materialized artifact, and
blackboard, immediately before that same activation’s own first tick, so a hosted
state’s member call is available from that very first tick (no “second tick before
members work” gap); returning null is a graph with no member operations to bind. The
row index lets the caller resolve that row’s own distinct member references and
provider rather than the host graph’s own (FSM-013 C1): a hosted artifact’s member
calls bind against its own authored member declarations, never the host’s.
For a probability graph, a supplied random seed must be nonzero. A null seed derives
the same deterministic nonzero seed from the actual owner identity as a GameObject host.
Entity hosts pass their explicit seed, including zero when none was supplied, rather
than selecting the managed identity-derived policy.
Dispose()
Section titled “Dispose()”public void Dispose()Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorHostedStateMachineRuntime.cs:615-621
Disposes the currently materialized row, if any, and the one-slot storage.
ReconcileAfterHostTick(NativeArray<BakedBlackboardSlot> hostBlackboardLayout, NativeArray<byte> hostBlackboard, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext context)
Section titled “ReconcileAfterHostTick(NativeArray<BakedBlackboardSlot> hostBlackboardLayout, NativeArray<byte> hostBlackboard, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext context)”public void ReconcileAfterHostTick(Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedBlackboardSlot> hostBlackboardLayout, Unity.Collections.NativeArray<byte> hostBlackboard, UnityEngine.EntityId entityId, int frameNumber, float deltaSeconds, in BitQuirky.Behavior.Authority.AuthorityContext context)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorHostedStateMachineRuntime.cs:284-336
Materializes a freshly activated row (seeding its input blackboard from the host’s current values) and ticks it once, or releases a row the host’s own tick just consumed or tore down. Call immediately after the host’s own primary tick every update.
ReleaseActive()
Section titled “ReleaseActive()”public void ReleaseActive()Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorHostedStateMachineRuntime.cs:243-256
Immediately disposes any currently materialized hosted instance and releases the one-slot claim, with no resume (/FSM-013 row 3), for a caller that tears the host down outside its own normal tick cadence: a reset, a cancellation, or an agent disable. The next activation materializes fresh and replays the owner’s initial random sequence. Ordinary row completion and preemption preserve the advanced stream instead.
BehaviorReactiveConditionState
Section titled “BehaviorReactiveConditionState”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorReactiveConditionStateSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:787-792
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/Backend/Execution/BehaviorRuntimeInstance.cs:791
Shared-core observer state stored for this artifact table row.
BehaviorRuntimeArtifactBinding
Section titled “BehaviorRuntimeArtifactBinding”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorRuntimeArtifactBindingSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickSystem.cs:580-661
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/Backend/Execution/BehaviorTickSystem.cs:660
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/Backend/Execution/BehaviorTickSystem.cs:647
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/Backend/Execution/BehaviorTickSystem.cs:622
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/Backend/Execution/BehaviorTickSystem.cs:620
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/Backend/Execution/BehaviorTickSystem.cs:630
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/Backend/Execution/BehaviorTickSystem.cs:645
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/Backend/Execution/BehaviorTickSystem.cs:649
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/Backend/Execution/BehaviorTickSystem.cs:657
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/Backend/Execution/BehaviorTickSystem.cs:606
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/Backend/Execution/BehaviorTickSystem.cs:640-641
Service capabilities required by the reactive condition definitions.
MemberOperationByNode
Section titled “MemberOperationByNode”public Unity.Collections.NativeArray<int> MemberOperationByNodeSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickSystem.cs:636
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/Backend/Execution/BehaviorTickSystem.cs:634
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/Backend/Execution/BehaviorTickSystem.cs:614
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/Backend/Execution/BehaviorTickSystem.cs:583
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/Backend/Execution/BehaviorTickSystem.cs:632
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/Backend/Execution/BehaviorTickSystem.cs:638
Deterministically ordered reactive condition definitions.
ReadFieldIds
Section titled “ReadFieldIds”public Unity.Collections.NativeArray<int> ReadFieldIdsSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickSystem.cs:624
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/Backend/Execution/BehaviorTickSystem.cs:643
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/Backend/Execution/BehaviorTickSystem.cs:600
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/Backend/Execution/BehaviorTickSystem.cs:602
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/Backend/Execution/BehaviorTickSystem.cs:604
Lifecycle rows for state-owned hosted behavior trees.
StateIndexByNode
Section titled “StateIndexByNode”public Unity.Collections.NativeArray<int> StateIndexByNodeSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickSystem.cs:618
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/Backend/Execution/BehaviorTickSystem.cs:612
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/Backend/Execution/BehaviorTickSystem.cs:610
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/Backend/Execution/BehaviorTickSystem.cs:608
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/Backend/Execution/BehaviorTickSystem.cs:616
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/Backend/Execution/BehaviorTickSystem.cs:595
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/Backend/Execution/BehaviorTickSystem.cs:598
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/Backend/Execution/BehaviorTickSystem.cs:585
The artifact’s transition table; a state’s outgoing edges are the contiguous run of rows whose source is that state.
UtilityBranches
Section titled “UtilityBranches”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityBranch> UtilityBranchesSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickSystem.cs:589
Branches of every Utility Selector, addressed by the selector node’s (UtilityBranchStart, UtilityBranchCount) range.
UtilityConsiderations
Section titled “UtilityConsiderations”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityConsideration> UtilityConsiderationsSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickSystem.cs:591
Considerations of every Utility Selector branch, addressed by the owning branch’s (ConsiderationStart, ConsiderationCount) range.
UtilityCurveSamples
Section titled “UtilityCurveSamples”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityCurveSample> UtilityCurveSamplesSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickSystem.cs:593
Curve keys of every Utility Selector consideration sampled through a curve, addressed by the owning consideration’s (CurveStart, CurveKeyCount) range.
WaitsServiceIds
Section titled “WaitsServiceIds”public Unity.Collections.NativeArray<int> WaitsServiceIdsSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickSystem.cs:628
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/Backend/Execution/BehaviorTickSystem.cs:587
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/Backend/Execution/BehaviorTickSystem.cs:626
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/Backend/Execution/BehaviorRuntimeInstance.cs:843-853
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/Backend/Execution/BehaviorRuntimeInstance.cs:847
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/Backend/Execution/BehaviorRuntimeInstance.cs:850
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/Backend/Execution/BehaviorRuntimeInstance.cs:852
Wraps a raw blackboard byte so it can be written into the buffer.
BehaviorRuntimeHostedStateMachineInstance
Section titled “BehaviorRuntimeHostedStateMachineInstance”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorRuntimeHostedStateMachineInstanceSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:809-814
Implements: IBufferElementData
Entity dynamic-buffer element holding a Hosted State Machine node’s (FSM-013) one-slot referenced-artifact instance, resized to exactly one element at attachment so the shared batched tick job can address it with the same one-slot contract the GameObject binding’s own persistently allocated slot uses.
Responsibilities:
- Let the Burst-compiled batched job claim, read, and release the owning Hosted State Machine node’s materialized result per entity, exactly as it does for every other per-entity runtime state array.
Does NOT:
- Materialize, tick, or dispose the referenced artifact itself: that remains managed work
driven by
BehaviorHostedStateMachineRuntimeoutside the job.
Members
Section titled “Members”public BitQuirky.Behavior.Execution.BehaviorRuntimeInstance ValueSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:813
The one-slot hosted instance’s current runtime state.
BehaviorRuntimeHostedStateMachineOwningNodeIndex
Section titled “BehaviorRuntimeHostedStateMachineOwningNodeIndex”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorRuntimeHostedStateMachineOwningNodeIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:829-834
Implements: IBufferElementData
Entity dynamic-buffer element holding the baked node index of the Hosted State Machine node that currently ownsBehaviorRuntimeHostedStateMachineInstancefor this entity, or -1 when none does (FSM-013).
Responsibilities:
- Mirror, per entity, the single owning-node-index slot the GameObject binding’s own persistently allocated array holds.
Does NOT:
- Resolve the owning node’s referenced artifact or decide materialization; the shared tick core and the managed hosted-instance driver own that decision.
Members
Section titled “Members”public int ValueSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:833
The owning baked node index, or -1 when no Hosted State Machine is active.
BehaviorRuntimeInstance
Section titled “BehaviorRuntimeInstance”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorRuntimeInstanceSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:50-775
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/Backend/Execution/BehaviorRuntimeInstance.cs:339
Monotonic activation generation for direct state action lists.
ActionLifecycle
Section titled “ActionLifecycle”public BitQuirky.Behavior.Execution.BehaviorActionLifecycleRuntimeState ActionLifecycleSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:345
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/Backend/Execution/BehaviorRuntimeInstance.cs:155
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/Backend/Execution/BehaviorRuntimeInstance.cs:124
Active composed-machine row; zero is the host machine.
ActiveNestedReferenceNodeIndex
Section titled “ActiveNestedReferenceNodeIndex”public int ActiveNestedReferenceNodeIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:109
Requested frame capacity when a Push could not fit this tick.
ActiveProbabilitySelectorIndex
Section titled “ActiveProbabilitySelectorIndex”public int ActiveProbabilitySelectorIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:187
Active probability selector, or -1 when no weighted selection is active.
ActiveStateMachineCandidateIndex
Section titled “ActiveStateMachineCandidateIndex”public int ActiveStateMachineCandidateIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:118
Selected referenced-machine candidate node, or -1 while parked/outside.
ActiveStateMachineReferenceIndex
Section titled “ActiveStateMachineReferenceIndex”public int ActiveStateMachineReferenceIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:115
Referenced-machine node currently executing, or -1 outside a reference.
ActiveUtilitySelectorIndex
Section titled “ActiveUtilitySelectorIndex”public int ActiveUtilitySelectorIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:215
Active Utility Selector, or -1 when no highest-score selection is active.
AuthorityContextId
Section titled “AuthorityContextId”public BitQuirky.Behavior.Baked.BakedAuthorityContext AuthorityContextIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:272
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/Backend/Execution/BehaviorRuntimeInstance.cs:142
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/Backend/Execution/BehaviorRuntimeInstance.cs:163
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/Backend/Execution/BehaviorRuntimeInstance.cs:89
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/Backend/Execution/BehaviorRuntimeInstance.cs:100
Active top-level statechart state’s baked-node index.
DecoratorIterationsCompleted
Section titled “DecoratorIterationsCompleted”public int DecoratorIterationsCompletedSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:149
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/Backend/Execution/BehaviorRuntimeInstance.cs:95
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/Backend/Execution/BehaviorRuntimeInstance.cs:75
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/Backend/Execution/BehaviorRuntimeInstance.cs:83
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.
HostStep
Section titled “HostStep”public int HostStepSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:316
Ordinal of the current host observation. Explicit HostStep entries always advance it; Microstep entries share it. Automatic uses the legacy frame/delta boundary described byRepeatRestartedThisFrame. Compared only for equality, so wrapping is harmless.
HostedCompletedCycleCount
Section titled “HostedCompletedCycleCount”public int HostedCompletedCycleCountSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:376
Terminal hosted cycles completed sinceHostedStateIndexwas entered.
HostedEventPending
Section titled “HostedEventPending”public byte HostedEventPendingSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:414
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/Backend/Execution/BehaviorRuntimeInstance.cs:383
Frame that recorded the latest terminal hosted cycle, or -1, for traces and the result event’s tick. The Repeat lifetime’s once-per-tick rule keys on HostedLastCycleStepinstead.
HostedLastCycleStep
Section titled “HostedLastCycleStep”public int HostedLastCycleStepSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:390
HostStepthat recorded the latest terminal hosted cycle, or -1. A Repeat lifetime starts its fresh cycle on the next host step rather than the current one, so each of several FixedUpdate steps in one render frame still runs one cycle.
HostedLifetime
Section titled “HostedLifetime”public BitQuirky.Behavior.Baked.BakedHostedBehaviorLifetime HostedLifetimeSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:405
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/Backend/Execution/BehaviorRuntimeInstance.cs:417
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/Backend/Execution/BehaviorRuntimeInstance.cs:408
Terminal result of the latest hosted cycle, or None.
HostedResultEventId
Section titled “HostedResultEventId”public int HostedResultEventIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:399
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/Backend/Execution/BehaviorRuntimeInstance.cs:393
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/Backend/Execution/BehaviorRuntimeInstance.cs:371
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/Backend/Execution/BehaviorRuntimeInstance.cs:177
Seed supplied when this runtime instance was created.
LastEvaluatedTransitionPredicateId
Section titled “LastEvaluatedTransitionPredicateId”public int LastEvaluatedTransitionPredicateIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:250
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/Backend/Execution/BehaviorRuntimeInstance.cs:260
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/Backend/Execution/BehaviorRuntimeInstance.cs:282
Latest structured branch interruption, if one has occurred.
LastProbabilitySelectorIndex
Section titled “LastProbabilitySelectorIndex”public int LastProbabilitySelectorIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:195
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/Backend/Execution/BehaviorRuntimeInstance.cs:262
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/Backend/Execution/BehaviorRuntimeInstance.cs:279
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/Backend/Execution/BehaviorRuntimeInstance.cs:242
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/Backend/Execution/BehaviorRuntimeInstance.cs:248
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/Backend/Execution/BehaviorRuntimeInstance.cs:240
Interned string index of the most recently fired transition’s authored id, or -1 before any transition fires.
LastUtilitySelectorIndex
Section titled “LastUtilitySelectorIndex”public int LastUtilitySelectorIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:221
Utility Selector that owns the retained selected branch and candidate mask, or -1 before any selection and after reset or interruption.
LastUtilityTrace
Section titled “LastUtilityTrace”public BitQuirky.Behavior.Diagnostics.BehaviorUtilityTraceEntry LastUtilityTraceSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:291
Latest structured tactic-change trace entry recorded when a Utility Selector’s
committed branch actually changed (; contract
per-agent-tactic-observation.md§Structured Tracing; research D-R10). Frame
-1 before any committed-branch change has ever been recorded. Held across ticks,
including a tick where no change occurred, exactly likeLastInterruption.
MachineFinished
Section titled “MachineFinished”public byte MachineFinishedSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:135
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/Backend/Execution/BehaviorRuntimeInstance.cs:268
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/Backend/Execution/BehaviorRuntimeInstance.cs:64
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/Backend/Execution/BehaviorRuntimeInstance.cs:361
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/Backend/Execution/BehaviorRuntimeInstance.cs:355
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/Backend/Execution/BehaviorRuntimeInstance.cs:130
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/Backend/Execution/BehaviorRuntimeInstance.cs:127
Final result of the most recently completed nested machine.
NextCommandId
Section titled “NextCommandId”public int NextCommandIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:336
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/Backend/Execution/BehaviorRuntimeInstance.cs:323
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/Backend/Execution/BehaviorRuntimeInstance.cs:325
Pending-external slot 1.
Pending2
Section titled “Pending2”public BitQuirky.Behavior.Execution.PendingExternalSlot Pending2Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:327
Pending-external slot 2.
Pending3
Section titled “Pending3”public BitQuirky.Behavior.Execution.PendingExternalSlot Pending3Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:329
Pending-external slot 3.
ProbabilityCandidateMask
Section titled “ProbabilityCandidateMask”public ulong ProbabilityCandidateMaskSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:210
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/Backend/Execution/BehaviorRuntimeInstance.cs:182
Current deterministic pseudo-random state for probability nodes.
ReferenceActivationGeneration
Section titled “ReferenceActivationGeneration”public uint ReferenceActivationGenerationSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:121
Monotonic identity of the latest referenced-machine candidate activation.
ReferenceParked
Section titled “ReferenceParked”public byte ReferenceParkedSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:132
One while a reference is parked because no candidate is eligible.
RepeatRestartedThisFrame
Section titled “RepeatRestartedThisFrame”public byte RepeatRestartedThisFrameSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:303
Non-zero after a Repeat restarts and descends into a fresh leaf during the current host observation. ExplicitHostStepentries clear it even when the delta is zero and the frame is unchanged. Explicit Microstepentries retain it, preventing a continuation from evaluating facts invalidated by an earlier Repeat restart. Automaticpreserves the original public protocol: a changed frame or positive delta begins a host step; zero delta in the same frame continues it.
RepeatRestartedThisFrameNumber
Section titled “RepeatRestartedThisFrameNumber”public int RepeatRestartedThisFrameNumberSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:309
Host frame number at the last entry that began a host observation and cleared
RepeatRestartedThisFrame. Sentinel -1before the first tick.
RequiredSuspendedActionCapacity
Section titled “RequiredSuspendedActionCapacity”public int RequiredSuspendedActionCapacitySource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:113
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/Backend/Execution/BehaviorRuntimeInstance.cs:111
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/Backend/Execution/BehaviorRuntimeInstance.cs:274
Reserved byte kept zero for additive binary evolution.
SelectedProbabilityChildIndex
Section titled “SelectedProbabilityChildIndex”public int SelectedProbabilityChildIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:203
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.
SelectedUtilityBranchIndex
Section titled “SelectedUtilityBranchIndex”public int SelectedUtilityBranchIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:227
Row of the running branch in the artifact’s utility-branch table, or -1 before selection and after reset.
StateActiveElapsedSeconds
Section titled “StateActiveElapsedSeconds”public float StateActiveElapsedSecondsSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:172
Wall-clock secondsCurrentStateIndexhas been continuously active, accumulated once per real host tick (never per internal execution-step iteration) and reset to zero whenever a new state activates. Gates that state’s own outgoing transitions against its authored minimum-active-duration parameter (, /); a state with no such parameter is never gated by this clock.
SuspendedActionStateCount
Section titled “SuspendedActionStateCount”public int SuspendedActionStateCountSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:106
Used rows in the sparse suspended-action pool.
SuspensionDepth
Section titled “SuspensionDepth”public int SuspensionDepthSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:103
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/Backend/Execution/BehaviorRuntimeInstance.cs:270
Trace verbosity this instance publishes; ForReplacement carries it forward.
UtilityCandidateMask
Section titled “UtilityCandidateMask”public ulong UtilityCandidateMaskSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:233
Eligible Utility Selector branches, addressed by authored source order. A Failure removes the failed branch’s bit so the same pass never re-selects it.
CancelAllPending()
Section titled “CancelAllPending()”public void CancelAllPending()Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:681-688
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/Backend/Execution/BehaviorRuntimeInstance.cs:746-757
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/Backend/Execution/BehaviorRuntimeInstance.cs:715-740
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/Backend/Execution/BehaviorRuntimeInstance.cs:638-646
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/Backend/Execution/BehaviorRuntimeInstance.cs:429-439
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/Backend/Execution/BehaviorRuntimeInstance.cs:445-459
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/Backend/Execution/BehaviorRuntimeInstance.cs:466-488
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/Backend/Execution/BehaviorRuntimeInstance.cs:576-586
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/Backend/Execution/BehaviorRuntimeInstance.cs:693-697
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/Backend/Execution/BehaviorRuntimeInstance.cs:764-772
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/Backend/Execution/BehaviorRuntimeInstance.cs:704-709
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/Backend/Execution/BehaviorRuntimeInstance.cs:671-674
Free a pending slot.
ReserveCommandId()
Section titled “ReserveCommandId()”public int ReserveCommandId()Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorRuntimeInstance.cs:652-666
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/Backend/Execution/BehaviorRuntimeInstance.cs:591-600
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/Backend/Execution/BehaviorRuntimeInstance.cs:607-632
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/Backend/Execution/BehaviorTickSystem.cs:680-684
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/Backend/Execution/BehaviorTickSystem.cs:683
Host-defined id used by debug pause / step decisions.
BehaviorTick
Section titled “BehaviorTick”Category: Low-level runtime
class BitQuirky.Behavior.Execution.BehaviorTickSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:343-1276
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/Backend/Execution/BehaviorTickCore.cs:1015-1060
Cancel fixed, active-action, and suspended pending operations, then restore a fresh instance.
GetImmediateMemberDrainLimit(int executionStepLimit, int transitionMemberConditionCount)
Section titled “GetImmediateMemberDrainLimit(int executionStepLimit, int transitionMemberConditionCount)”public static int GetImmediateMemberDrainLimit(int executionStepLimit, int transitionMemberConditionCount)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:351-357
Bounds an immediate-member drain independently of the kernel’s node-walk budget. Each authored member transition predicate can request one additional observation; repeated references to the same binding still count as separate predicate rows. Uses the baked inventory, including materialized legacy caches, without scanning it.
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/Backend/Execution/BehaviorTickCore.cs:980-996
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/Backend/Execution/BehaviorTickCore.cs:999-1009
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/Backend/Execution/BehaviorTickCore.cs:925-935
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/Backend/Execution/BehaviorTickCore.cs:868-880
Restore a persistent node-status vector and deepest cursor to their fresh state.
ResetLiveValueOverlayStates(NativeArray<BehaviorLiveValueOverlayRuntimeState> liveValueOverlayStates)
Section titled “ResetLiveValueOverlayStates(NativeArray<BehaviorLiveValueOverlayRuntimeState> liveValueOverlayStates)”public static void ResetLiveValueOverlayStates(Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorLiveValueOverlayRuntimeState> liveValueOverlayStates)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:938-949
Clears every per-slot live-value overlay when a graph instance resets.
ResetProbabilityStates(NativeArray<BehaviorProbabilityRuntimeState> states)
Section titled “ResetProbabilityStates(NativeArray<BehaviorProbabilityRuntimeState> states)”public static void ResetProbabilityStates(Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorProbabilityRuntimeState> states)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:911-915
Clears every weighted-selector activation while retaining host-owned storage.
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/Backend/Execution/BehaviorTickCore.cs:952-963
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/Backend/Execution/BehaviorTickCore.cs:897-908
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/Backend/Execution/BehaviorTickCore.cs:883-894
Clears every per-decorator elapsed clock when a graph instance resets.
ResetTransitionConditionStates(NativeArray<BehaviorTransitionConditionRuntimeState> states)
Section titled “ResetTransitionConditionStates(NativeArray<BehaviorTransitionConditionRuntimeState> states)”public static void ResetTransitionConditionStates(Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorTransitionConditionRuntimeState> states)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:918-922
Clears every same-tick transition predicate observation on graph reset.
ResetUtilityBranchScores(NativeArray<BehaviorUtilityBranchScore> utilityBranchScores)
Section titled “ResetUtilityBranchScores(NativeArray<BehaviorUtilityBranchScore> utilityBranchScores)”public static void ResetUtilityBranchScores(Unity.Collections.NativeArray<BitQuirky.Behavior.Diagnostics.BehaviorUtilityBranchScore> utilityBranchScores)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:966-977
Clears every branch’s score, active flag, commitment, and evaluated flag when a graph instance resets.
SeedHostedBlackboard(NativeArray<BakedBlackboardSlot> hostLayout, NativeArray<byte> hostBlackboard, NativeArray<BakedBlackboardSlot> hostedLayout, NativeArray<byte> hostedBlackboard)
Section titled “SeedHostedBlackboard(NativeArray<BakedBlackboardSlot> hostLayout, NativeArray<byte> hostBlackboard, NativeArray<BakedBlackboardSlot> hostedLayout, NativeArray<byte> hostedBlackboard)”public static void SeedHostedBlackboard(Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedBlackboardSlot> hostLayout, Unity.Collections.NativeArray<byte> hostBlackboard, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedBlackboardSlot> hostedLayout, Unity.Collections.NativeArray<byte> hostedBlackboard)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:833-863
Copies, once, every blackboard field declared with the same stable name hash and the
sameBakedFieldTypeCode on both layouts from hostBlackboard into hostedBlackboard(FSM-013, research.md
R3; data-model.md entity 4): the mechanism that carries a recorded input, such as a
last-known position, into a freshly materialized hosted instance with no new baked
row. A field declared on only one side keeps its own declared default.
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/Backend/Execution/BehaviorTickCore.cs:366-390
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/Backend/Execution/BehaviorTickCore.cs:395-420
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/Backend/Execution/BehaviorTickCore.cs:425-450
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/Backend/Execution/BehaviorTickCore.cs:455-481
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/Backend/Execution/BehaviorTickCore.cs:520-550
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/Backend/Execution/BehaviorTickCore.cs:555-589
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, NativeArray<BehaviorUtilityBranchScore> utilityBranchScores, NativeArray<BehaviorProbabilityRuntimeState> probabilityStates, NativeArray<BehaviorTransitionConditionRuntimeState> transitionConditionStates, BehaviorTickInvocationKind invocationKind)
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, NativeArray<BehaviorUtilityBranchScore> utilityBranchScores, NativeArray<BehaviorProbabilityRuntimeState> probabilityStates, NativeArray<BehaviorTransitionConditionRuntimeState> transitionConditionStates, BehaviorTickInvocationKind invocationKind)”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, Unity.Collections.NativeArray<BitQuirky.Behavior.Diagnostics.BehaviorUtilityBranchScore> utilityBranchScores = default(Unity.Collections.NativeArray<BitQuirky.Behavior.Diagnostics.BehaviorUtilityBranchScore>), Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorProbabilityRuntimeState> probabilityStates = default(Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorProbabilityRuntimeState>), Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorTransitionConditionRuntimeState> transitionConditionStates = default(Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorTransitionConditionRuntimeState>), BitQuirky.Behavior.Execution.BehaviorTickInvocationKind invocationKind = Automatic)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:592-638
Advance one agent with preallocated Push suspension storage.
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, NativeArray<BehaviorLiveValueOverlayRuntimeState> liveValueOverlayStates, in BehaviorTickBakedInput baked, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext executingContext, NativeArray<ExternalServiceCompletionRecord> completionRingSnapshot, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter, NativeArray<BehaviorUtilityBranchScore> utilityBranchScores, NativeArray<BehaviorProbabilityRuntimeState> probabilityStates, NativeArray<BehaviorTransitionConditionRuntimeState> transitionConditionStates, BehaviorTickInvocationKind invocationKind)
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, NativeArray<BehaviorLiveValueOverlayRuntimeState> liveValueOverlayStates, in BehaviorTickBakedInput baked, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext executingContext, NativeArray<ExternalServiceCompletionRecord> completionRingSnapshot, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter, NativeArray<BehaviorUtilityBranchScore> utilityBranchScores, NativeArray<BehaviorProbabilityRuntimeState> probabilityStates, NativeArray<BehaviorTransitionConditionRuntimeState> transitionConditionStates, BehaviorTickInvocationKind invocationKind)”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, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorLiveValueOverlayRuntimeState> liveValueOverlayStates, 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, Unity.Collections.NativeArray<BitQuirky.Behavior.Diagnostics.BehaviorUtilityBranchScore> utilityBranchScores = default(Unity.Collections.NativeArray<BitQuirky.Behavior.Diagnostics.BehaviorUtilityBranchScore>), Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorProbabilityRuntimeState> probabilityStates = default(Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorProbabilityRuntimeState>), Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorTransitionConditionRuntimeState> transitionConditionStates = default(Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorTransitionConditionRuntimeState>), BitQuirky.Behavior.Execution.BehaviorTickInvocationKind invocationKind = Automatic)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:645-728
Advance one agent with every persistent runtime table, including the per-instance live-value overlay a developer’s accepted edit writes into , and every baked Utility Selector branch’s current score.
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, NativeArray<BehaviorLiveValueOverlayRuntimeState> liveValueOverlayStates, in BehaviorTickBakedInput baked, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext executingContext, NativeArray<ExternalServiceCompletionRecord> completionRingSnapshot, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter, NativeArray<BehaviorUtilityBranchScore> utilityBranchScores, NativeArray<BehaviorRuntimeInstance> hostedStateMachineInstance, NativeArray<int> hostedStateMachineOwningNodeIndex, NativeArray<BehaviorProbabilityRuntimeState> probabilityStates, NativeArray<BehaviorTransitionConditionRuntimeState> transitionConditionStates, BehaviorTickInvocationKind invocationKind)
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, NativeArray<BehaviorLiveValueOverlayRuntimeState> liveValueOverlayStates, in BehaviorTickBakedInput baked, EntityId entityId, int frameNumber, float deltaSeconds, in AuthorityContext executingContext, NativeArray<ExternalServiceCompletionRecord> completionRingSnapshot, NativeQueue<ExternalServiceCommand>.ParallelWriter commandWriter, NativeArray<BehaviorUtilityBranchScore> utilityBranchScores, NativeArray<BehaviorRuntimeInstance> hostedStateMachineInstance, NativeArray<int> hostedStateMachineOwningNodeIndex, NativeArray<BehaviorProbabilityRuntimeState> probabilityStates, NativeArray<BehaviorTransitionConditionRuntimeState> transitionConditionStates, BehaviorTickInvocationKind invocationKind)”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, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorLiveValueOverlayRuntimeState> liveValueOverlayStates, 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, Unity.Collections.NativeArray<BitQuirky.Behavior.Diagnostics.BehaviorUtilityBranchScore> utilityBranchScores, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorRuntimeInstance> hostedStateMachineInstance, Unity.Collections.NativeArray<int> hostedStateMachineOwningNodeIndex, Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorProbabilityRuntimeState> probabilityStates = default(Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorProbabilityRuntimeState>), Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorTransitionConditionRuntimeState> transitionConditionStates = default(Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorTransitionConditionRuntimeState>), BitQuirky.Behavior.Execution.BehaviorTickInvocationKind invocationKind = Automatic)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:736-823
Advance one agent exactly as the primary overload does, additionally threading the one-slot hosted instance a Hosted State Machine node materializes (FSM-013). Callers with no such node pass empty arrays, which is exactly what every pre-existing caller of the primary overload keeps doing unchanged.
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/Backend/Execution/BehaviorTickCore.cs:486-514
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/Backend/Execution/BehaviorTickCore.cs:48-312
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/Backend/Execution/BehaviorTickCore.cs:117
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/Backend/Execution/BehaviorTickCore.cs:92
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/Backend/Execution/BehaviorTickCore.cs:90
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/Backend/Execution/BehaviorTickCore.cs:107
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/Backend/Execution/BehaviorTickCore.cs:115
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/Backend/Execution/BehaviorTickCore.cs:119
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/Backend/Execution/BehaviorTickCore.cs:80
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/Backend/Execution/BehaviorTickCore.cs:104-105
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/Backend/Execution/BehaviorTickCore.cs:111
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/Backend/Execution/BehaviorTickCore.cs:109
Append-only baked member operation table .
NativeDefaultBytes
Section titled “NativeDefaultBytes”public readonly Unity.Collections.NativeArray<byte> NativeDefaultBytesSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:88
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/Backend/Execution/BehaviorTickCore.cs:51
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/Backend/Execution/BehaviorTickCore.cs:100
Dense semantic node parameter table.
ProbabilitySelectorCount
Section titled “ProbabilitySelectorCount”public readonly int ProbabilitySelectorCountSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:122
Number of persistent Probability Selector rows required by the graph.
ReactiveConditions
Section titled “ReactiveConditions”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedReactiveCondition> ReactiveConditionsSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:102
Deterministically ordered reactive condition definitions.
ReadFieldIds
Section titled “ReadFieldIds”public readonly Unity.Collections.NativeArray<int> ReadFieldIdsSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:94
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/Backend/Execution/BehaviorTickCore.cs:113
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/Backend/Execution/BehaviorTickCore.cs:70
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/Backend/Execution/BehaviorTickCore.cs:72
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/Backend/Execution/BehaviorTickCore.cs:74
State-owned hosted behavior tree lifecycle rows .
StateIndexByNode
Section titled “StateIndexByNode”public readonly Unity.Collections.NativeArray<int> StateIndexByNodeSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:78
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/Backend/Execution/BehaviorTickCore.cs:86
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/Backend/Execution/BehaviorTickCore.cs:84
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/Backend/Execution/BehaviorTickCore.cs:82
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/Backend/Execution/BehaviorTickCore.cs:76
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/Backend/Execution/BehaviorTickCore.cs:63
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/Backend/Execution/BehaviorTickCore.cs:68
Deterministic constant bytes of every transition predicate whose declared operand is wider than the row’s eight-byte constant column .
TransitionMemberConditionCount
Section titled “TransitionMemberConditionCount”public readonly int TransitionMemberConditionCountSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:124
Number of persistent member transition-predicate cache rows.
Transitions
Section titled “Transitions”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedTransition> TransitionsSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:53
Every state transition, ordered by source state then authored order, so row order is evaluation priority.
UtilityBranches
Section titled “UtilityBranches”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityBranch> UtilityBranchesSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:57
Branches of every Utility Selector, addressed by the owning selector node’s utility-branch range.
UtilityConsiderations
Section titled “UtilityConsiderations”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityConsideration> UtilityConsiderationsSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:59
Considerations of every Utility Selector branch, addressed by the owning branch’s consideration range.
UtilityCurveSamples
Section titled “UtilityCurveSamples”public readonly Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityCurveSample> UtilityCurveSamplesSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:61
Curve keys of every Utility Selector consideration sampled through a curve, addressed by the owning consideration’s curve range.
WaitsServiceIds
Section titled “WaitsServiceIds”public readonly Unity.Collections.NativeArray<int> WaitsServiceIdsSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:98
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/Backend/Execution/BehaviorTickCore.cs:55
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/Backend/Execution/BehaviorTickCore.cs:96
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, NativeArray<BakedUtilityBranch> utilityBranches, NativeArray<BakedUtilityConsideration> utilityConsiderations, NativeArray<BakedUtilityCurveSample> utilityCurveSamples)
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, NativeArray<BakedUtilityBranch> utilityBranches, NativeArray<BakedUtilityConsideration> utilityConsiderations, NativeArray<BakedUtilityCurveSample> utilityCurveSamples)”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, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityBranch> utilityBranches = default(Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityBranch>), Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityConsideration> utilityConsiderations = default(Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityConsideration>), Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityCurveSample> utilityCurveSamples = default(Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityCurveSample>))Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:131-197
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, NativeArray<BakedUtilityBranch> utilityBranches, NativeArray<BakedUtilityConsideration> utilityConsiderations, NativeArray<BakedUtilityCurveSample> utilityCurveSamples, int probabilitySelectorCount, int transitionMemberConditionCount)
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, NativeArray<BakedUtilityBranch> utilityBranches, NativeArray<BakedUtilityConsideration> utilityConsiderations, NativeArray<BakedUtilityCurveSample> utilityCurveSamples, int probabilitySelectorCount, int transitionMemberConditionCount)”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, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityBranch> utilityBranches = default(Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityBranch>), Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityConsideration> utilityConsiderations = default(Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityConsideration>), Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityCurveSample> utilityCurveSamples = default(Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityCurveSample>), int probabilitySelectorCount = 0, int transitionMemberConditionCount = 0)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickCore.cs:204-257
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/Backend/Execution/BehaviorTickCore.cs:264-311
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/Backend/Execution/BehaviorTickSystem.cs:710-739
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/Backend/Execution/BehaviorTickSystem.cs:738
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/Backend/Execution/BehaviorTickSystem.cs:727
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/Backend/Execution/BehaviorTickSystem.cs:717
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/Backend/Execution/BehaviorTickSystem.cs:715
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/Backend/Execution/BehaviorTickSystem.cs:735
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/Backend/Execution/BehaviorTickSystem.cs:713
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/Backend/Execution/BehaviorTickSystem.cs:699-703
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/Backend/Execution/BehaviorTickSystem.cs:702
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/Backend/Execution/BehaviorTickSystem.cs:747-770
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/Backend/Execution/BehaviorTickSystem.cs:753
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/Backend/Execution/BehaviorTickSystem.cs:750
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/Backend/Execution/BehaviorTickSystem.cs:761-769
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/Backend/Execution/BehaviorTickJob.cs:52-257
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/Backend/Execution/BehaviorTickJob.cs:116
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/Backend/Execution/BehaviorTickJob.cs:88
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/Backend/Execution/BehaviorTickJob.cs:86
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/Backend/Execution/BehaviorTickJob.cs:142
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/Backend/Execution/BehaviorTickJob.cs:127
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/Backend/Execution/BehaviorTickJob.cs:133
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/Backend/Execution/BehaviorTickJob.cs:131
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/Backend/Execution/BehaviorTickJob.cs:110
Flattened emitted-service ids, addressed by each node’s emit range.
EntryStateIndex
Section titled “EntryStateIndex”public int EntryStateIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickJob.cs:114
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/Backend/Execution/BehaviorTickJob.cs:125
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/Backend/Execution/BehaviorTickJob.cs:118
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/Backend/Execution/BehaviorTickJob.cs:129
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/Backend/Execution/BehaviorTickJob.cs:135
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/Backend/Execution/BehaviorTickJob.cs:84
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/Backend/Execution/BehaviorTickJob.cs:100
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/Backend/Execution/BehaviorTickJob.cs:98
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/Backend/Execution/BehaviorTickJob.cs:108
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/Backend/Execution/BehaviorTickJob.cs:58
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/Backend/Execution/BehaviorTickJob.cs:96
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/Backend/Execution/BehaviorTickJob.cs:90
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/Backend/Execution/BehaviorTickJob.cs:112
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/Backend/Execution/BehaviorTickJob.cs:74
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/Backend/Execution/BehaviorTickJob.cs:76
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/Backend/Execution/BehaviorTickJob.cs:78
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/Backend/Execution/BehaviorTickJob.cs:82
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/Backend/Execution/BehaviorTickJob.cs:106
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/Backend/Execution/BehaviorTickJob.cs:104
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/Backend/Execution/BehaviorTickJob.cs:102
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/Backend/Execution/BehaviorTickJob.cs:80
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/Backend/Execution/BehaviorTickJob.cs:70
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/Backend/Execution/BehaviorTickJob.cs:72
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/Backend/Execution/BehaviorTickJob.cs:60
Every state transition of the shared graph, ordered by source state then authored order, so row order is evaluation priority.
UtilityBranches
Section titled “UtilityBranches”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityBranch> UtilityBranchesSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickJob.cs:64
Branches of every Utility Selector, addressed by the owning selector node’s utility-branch range.
UtilityConsiderations
Section titled “UtilityConsiderations”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityConsideration> UtilityConsiderationsSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickJob.cs:66
Considerations of every Utility Selector branch, addressed by the owning branch’s consideration range.
UtilityCurveSamples
Section titled “UtilityCurveSamples”public Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedUtilityCurveSample> UtilityCurveSamplesSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickJob.cs:68
Curve keys of every Utility Selector consideration sampled through a curve, addressed by the owning consideration’s curve range.
WaitsServiceIds
Section titled “WaitsServiceIds”public Unity.Collections.NativeArray<int> WaitsServiceIdsSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickJob.cs:94
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/Backend/Execution/BehaviorTickJob.cs:62
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/Backend/Execution/BehaviorTickJob.cs:92
Flattened write sets: one stable field id hash per entry, addressed by each node’s write range.
BehaviorTickSystem
Section titled “BehaviorTickSystem”Category: Low-level runtime
struct BitQuirky.Behavior.Execution.BehaviorTickSystemSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Execution/BehaviorTickSystem.cs:51-569
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/Backend/Execution/BehaviorTickSystem.cs:78-133
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/Backend/Execution/BehaviorTickSystem.cs:139-145
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/Backend/Execution/BehaviorTickSystem.cs:159-292
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.
Source fingerprint: sha256:29003d8b1658b98a79bebcd93e3b4030caf8511268b96817ab764d63df8d6c3b