Skip to content
Bit Quirky Behavior Trees and
State Machines

Search documentation

All topics and APIs

Close returns focus to Search.

What are you looking for?

Try a common topic or enter a complete API identifier.

Browse the reference instead

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

v0.6.0
Menu

Assembly: BitQuirky.Behavior.Runtime

Category: GameObject integration

C#
class BitQuirky.Behavior.GameObject.BehaviorAgent

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:44-1205

Inherits: MonoBehaviour

Thin GameObject owner over the same behavior execution core used by entities.

Responsibilities:

  • Materialize one imported artifact, own native runtime state, tick one selected Unity callback, and preserve the same instance across disable and re-enable.
  • Own one independently mutable managed blackboard companion clone for graphs that declare a GameObject-path value, restore it on reset, keep it across disable and re-enable, and release it exactly once on replacement and disposal.
  • Compose exact fact binders and command handlers around each shared-core step.
  • Carry one monotonic runtime generation, the running executable and generated member provider fingerprints, and one stable non-negative debug follower key, so an editor observer can pin exactly this runtime instance.
  • Consult an attached non-owning follower-keyed debug tick control before each selected Unity callback, so a Live document can pause and single-step this one agent through its normal tick path.

Does NOT:

  • Parse source, interpret nodes in managed code, create a backing World, or locate a default graph, binder, command handler, or movement backend.
  • Own, create, or dispose the debug tick control, or introduce a second evaluation path for a paused or stepped frame.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorActionRuntimeState> ActionStates { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:401

Gets persistent per-action progress for direct state action lists.

C#
public UnityEngine.EntityId AgentEntityId { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:321

Gets the stable Unity entity identity assigned to this GameObject.

C#
public BitQuirky.Behavior.GameObject.BehaviorAgentBindingMap BindingMap { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:431

Gets the exact initialized field and service ownership map.

C#
public Unity.Collections.NativeArray<byte> Blackboard { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:390

Gets the owned blackboard bytes.

C#
public UnityEngine.MonoBehaviour[] CommandHandlerComponents { get; set; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:193-202

Gets or sets explicitly composed command handlers before initialization.

C#
public BitQuirky.Behavior.ExternalService.ExternalServiceCommandQueue CommandQueue { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:422

Gets the owned external-service command queue.

C#
public BitQuirky.Behavior.ExternalService.ExternalServiceCompletionRing CompletionRing { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:425

Gets the owned external-service completion ring.

C#
public int DebugFollowerId { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:353-368

Gets the stable non-negative debug follower key that addresses this component in a BehaviorDebugTickControl. It identifies the component rather than one runtime generation, so two agents on one GameObject are two independently controllable followers.

C#
public BitQuirky.Behavior.Diagnostics.BehaviorDebugTickControl DebugTickControl { get; set; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:377-381

Gets or sets the non-owning per-follower debug tick control that the selected Unity callback consults before advancing. Null is the shipped default: nothing is attached, and the tick path costs one reference test. A Live document assigns its own control while it is attached and clears it again when it is released, so a released document can never leave this agent frozen.

C#
public ulong ExecutableFingerprint { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:336-337

Gets the executable content fingerprint of the artifact this component is running, or zero before initialization.

C#
public BitQuirky.Behavior.Authoring.BehaviorSourceAsset Graph { get; set; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:135-144

Gets or sets the imported behavior graph before initialization.

C#
public UnityEngine.MonoBehaviour[] InputBinderComponents { get; set; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:169-178

Gets or sets explicitly composed input binders before initialization.

C#
public bool IsDisposed { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:312

Gets whether this component has disposed its owned runtime state.

C#
public bool IsInitialized { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:309

Gets whether this component owns initialized runtime state.

C#
public bool IsTerminallyCancelled { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:315

Gets whether explicit terminal cancellation has stopped this agent.

C#
public BitQuirky.Behavior.Blackboard.BehaviorManagedBlackboardTemplate ManagedBlackboard { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:257

Gets this agent’s own independently mutable companion clone, or null when the graph declares no GameObject-path value. Two agents running the same graph never share it.

C#
public BitQuirky.Behavior.Blackboard.BehaviorManagedBlackboardTemplate ManagedBlackboardTemplate { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:250-251

Gets the generated managed blackboard companion template imported with this graph. A graph that declares a GameObject-path value requires it; a graph that declares none carries none.

C#
public BitQuirky.Behavior.Member.BehaviorMemberBindingRuntime MemberBindingRuntime { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:260

Gets the owned member binding runtime, or null when the graph binds no members.

C#
public BitQuirky.Behavior.Diagnostics.BehaviorMemberFaultTrace MemberFaultTrace { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:266

Gets the bounded managed companion trace for structured member faults, or null when this graph binds no members.

C#
public BitQuirky.Behavior.Member.IBehaviorMemberProvider MemberProvider { get; set; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:208-217

Gets or sets the explicitly composed consumer-owned member provider before initialization. Takes precedence over any serialized provider component.

C#
public UnityEngine.MonoBehaviour MemberProviderComponent { get; set; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:222-231

Gets or sets the explicitly composed serialized member component before initialization.

C#
public ulong MemberProviderFingerprint { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:345

Gets the binding-set fingerprint of the generated member provider this component initialized with, or zero when the graph binds no member. An initialized member runtime requires this to equal the artifact’s binding-set fingerprint, so a difference means the provider in use is not the one an observer attached to.

C#
public BitQuirky.Behavior.Member.BehaviorMemberReference[] MemberReferences { get; set; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:234-243

Gets or sets the serialized explicit member reference slots before initialization.

C#
public int MemberTargetReadingCount { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:277-278

Gets the number of live blackboard-variable target readings this agent holds.

C#
public UnityEngine.MonoBehaviour MovementAdapterComponent { get; set; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:157-166

Gets or sets the explicitly composed component implementing IBehaviorMovementAdapterbefore initialization.

C#
public BitQuirky.Behavior.Movement.BehaviorMovementService MovementService { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:428

Gets the movement service composed for this agent.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Diagnostics.BehaviorNodeExecutionStatus> NodeExecutionStatuses { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:397-398

Gets the persistent latest execution state for every baked node.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.ReactiveConditionRuntimeState> ReactiveConditionStates { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:393-394

Gets the persistent artifact-indexed reactive observer state.

C#
public int RefEvaluationReadingCount { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:293-294

Gets the number of live ref-parameter evaluation readings this agent holds.

C#
public BitQuirky.Behavior.Execution.BehaviorMachineResult Result { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:387

Gets the explicit final state-machine result, or None while still active.

C#
public uint RuntimeGeneration { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:330

Gets the advancing generation of this component’s initialized runtime. Zero means no runtime has been built yet. It advances on every initialization, graph replacement, and runtime reset. The unsigned counter wraps from its maximum back to one, keeping zero reserved for the uninitialized state. Disabling and re-enabling preserves the one runtime, so it preserves the generation.

C#
public BitQuirky.Behavior.Execution.BehaviorRuntimeInstance RuntimeInstance { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:384

Gets the owned behavior runtime state.

C#
public UnityEngine.MonoBehaviour[] ServiceAdapterComponents { get; set; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:181-190

Gets or sets explicitly composed general service adapters.

C#
public Unity.Collections.NativeArray<BitQuirky.Behavior.Execution.BehaviorStateSuspensionFrame> SuspensionFrames { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:404

Gets native Push suspension frames in activation order.

C#
public long TickCount { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:318

Gets the number of shared-core steps executed by this component.

C#
public int UnresolvedMemberTargetCount { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:273-274

Gets how many blackboard-variable member targets did not resolve on their last evaluation. This is a live reading that clears as soon as every variable holds a usable object again; it is never a bake verdict and is never written into the graph.

C#
public BitQuirky.Behavior.GameObject.BehaviorAgentUpdateMode UpdateMode { get; set; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:147-151

Gets or sets the one Unity callback that advances this agent.

C#
public void CancelActiveWork(int frameNumber)

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:479-482

Stops this agent’s outstanding external work exactly once.

C#
public void InitializeNow()

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:434-440

Initializes the one owned runtime instance when it has not started.

C#
public BitQuirky.Behavior.Member.BehaviorMemberTargetReading ReadMemberTargetReading(int index)

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:285-290

Reads one live blackboard-variable target reading for explicit tooling inspection, carrying graph, node, binding, variable, reason, the type required, and the object held. Formatting happens only on this explicit read.

C#
public BitQuirky.Behavior.Member.BehaviorMemberRefEvaluationReading ReadRefEvaluation(int index)

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:301-306

Reads one live ref-parameter evaluation reading for explicit tooling inspection, carrying the pre-call read, post-call write, and completion outcome of the last invocation observed. Formatting happens only on this explicit read.

ReplaceGraph(BehaviorSourceAsset graph, int frameNumber)

Section titled “ReplaceGraph(BehaviorSourceAsset graph, int frameNumber)”
C#
public void ReplaceGraph(BitQuirky.Behavior.Authoring.BehaviorSourceAsset graph, int frameNumber)

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:446-476

Cancels the current graph’s work, releases its owned native state, and initializes the replacement graph with the same explicit host composition.

C#
public void ResetRuntime(int frameNumber)

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:539-578

Restores the initialized artifact to its deterministic entry state.

TickOnce(float deltaTime, int frameNumber)

Section titled “TickOnce(float deltaTime, int frameNumber)”
C#
public BitQuirky.Behavior.Execution.BehaviorTickStepResult TickOnce(float deltaTime, int frameNumber)

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:650-712

Samples facts, advances the shared behavior core, and dispatches services once.

TryReadReferenceState(int referenceIndex, out BehaviorReferenceRuntimeState state)

Section titled “TryReadReferenceState(int referenceIndex, out BehaviorReferenceRuntimeState state)”
C#
public bool TryReadReferenceState(int referenceIndex, out BitQuirky.Behavior.Execution.BehaviorReferenceRuntimeState state)

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgent.cs:407-419

Reads one retained state-machine reference lifecycle without allocating.

Category: GameObject integration

C#
class BitQuirky.Behavior.GameObject.BehaviorAgentBindingMap

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgentBindingMap.cs:27-724

Exact initialized field and service ownership for one GameObject behavior agent.

Responsibilities:

  • Own the resolved binder and handler tables used by one explicitly composed agent.
  • Reject missing, duplicate, unknown, null, or incompatible authored bindings, while recognizing that member-projected fields and carried declared values are supplied by the graph itself rather than by an input binder.

Does NOT:

  • Own runtime native storage, tick behavior, or discover components by order.

C#
public int CommandHandlerCount { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgentBindingMap.cs:63

Gets the number of exact authored service-token mappings.

C#
public int InputBinderCount { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgentBindingMap.cs:60

Gets the number of explicitly composed input binder components.

Category: GameObject integration

C#
readonly struct BitQuirky.Behavior.GameObject.BehaviorAgentBlackboardFieldHandle<T> where T : unmanaged

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/IBehaviorAgentInputBinder.cs:20-58

Resolved type-safe blackboard field location for a GameObject input binder.

Responsibilities:

  • Write one validated unmanaged value without per-step name lookup or byte arithmetic.

Does NOT:

  • Own blackboard storage or resolve fields during a selected step.

C#
public bool IsValid { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/IBehaviorAgentInputBinder.cs:34

Gets whether this handle was resolved from a compatible baked field.

Write(NativeArray<byte> blackboard, T value)

Section titled “Write(NativeArray<byte> blackboard, T value)”
C#
public void Write(Unity.Collections.NativeArray<byte> blackboard, T value)

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/IBehaviorAgentInputBinder.cs:37-57

Writes one typed value to the resolved blackboard location.

Category: GameObject integration

C#
class BitQuirky.Behavior.GameObject.BehaviorAgentBlackboardSchema

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/IBehaviorAgentInputBinder.cs:70-164

Resolves required GameObject blackboard input fields once at composition.

Responsibilities:

  • Validate stable field name, baked type, and unmanaged storage size.
  • Reject field ownership shared between input binders during composition.

Does NOT:

  • Sample scene state or mutate live blackboard bytes.

C#
public BitQuirky.Behavior.GameObject.BehaviorAgentBlackboardFieldHandle<T> Require<T>(string fieldName) where T : unmanaged

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/IBehaviorAgentInputBinder.cs:100-133

Resolves a required field and validates its baked type and size.

Category: GameObject integration

C#
enum BitQuirky.Behavior.GameObject.BehaviorAgentUpdateMode

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgentUpdateMode.cs:14-21

Underlying type: byte

Unity callback selected for one GameObject behavior agent.

Responsibilities:

  • Select exactly one automatic Unity advancement callback.

Does NOT:

  • Change behavior semantics or introduce an externally driven tick mode.

C#
FixedUpdate = 1

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgentUpdateMode.cs:20

Advance once from each enabled fixed-step callback.

C#
Update = 0

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorAgentUpdateMode.cs:17

Advance once from each enabled frame callback.

BehaviorGameObjectBlackboardFieldHandle<T>

Section titled “BehaviorGameObjectBlackboardFieldHandle<T>”

Category: GameObject integration

C#
readonly struct BitQuirky.Behavior.GameObject.BehaviorGameObjectBlackboardFieldHandle<T> where T : unmanaged

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorGameObjectBlackboardSchema.cs:20-58

Resolved type-safe blackboard field location for a GameObject input binder.

Responsibilities:

  • Write one validated unmanaged value without per-step name lookup or byte arithmetic.

Does NOT:

  • Own blackboard storage or resolve fields during a selected step.

C#
public bool IsValid { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorGameObjectBlackboardSchema.cs:34

Gets whether this handle was resolved from a compatible baked field.

Write(NativeArray<byte> blackboard, T value)

Section titled “Write(NativeArray<byte> blackboard, T value)”
C#
public void Write(Unity.Collections.NativeArray<byte> blackboard, T value)

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorGameObjectBlackboardSchema.cs:37-57

Writes one typed value to the resolved blackboard location.

Category: GameObject integration

C#
class BitQuirky.Behavior.GameObject.BehaviorGameObjectBlackboardSchema

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorGameObjectBlackboardSchema.cs:70-156

Resolves and records exact GameObject blackboard input ownership during composition.

Responsibilities:

  • Validate stable field name, baked type, unmanaged storage size, and unique ownership.
  • Return typed handles that write without name lookup during a selected step.

Does NOT:

  • Sample scene state, mutate live blackboard bytes, or select a fallback field.

C#
public BitQuirky.Behavior.GameObject.BehaviorGameObjectBlackboardFieldHandle<T> Require<T>(string fieldName) where T : unmanaged

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/BehaviorGameObjectBlackboardSchema.cs:95-128

Resolves a required field and validates its baked type and size.

Category: GameObject integration

C#
interface BitQuirky.Behavior.GameObject.IBehaviorAgentInputBinder

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/IBehaviorAgentInputBinder.cs:175-182

Explicit GameObject fact binder invoked before each reactive behavior tick.

Responsibilities:

  • Resolve required typed fields once and sample current facts allocation-free per step.

Does NOT:

  • Tick behavior, dispatch services, or discover scene dependencies.

Bind(BehaviorAgentBlackboardSchema schema)

Section titled “Bind(BehaviorAgentBlackboardSchema schema)”
C#
void Bind(BitQuirky.Behavior.GameObject.BehaviorAgentBlackboardSchema schema)

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/IBehaviorAgentInputBinder.cs:178

Resolves all required fields once during agent composition.

C#
void Sample(Unity.Collections.NativeArray<byte> blackboard)

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/IBehaviorAgentInputBinder.cs:181

Samples current facts into the supplied blackboard before a tick.

Category: GameObject integration

C#
interface BitQuirky.Behavior.GameObject.IBehaviorGameObjectCommandHandler

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/IBehaviorGameObjectCommandHandler.cs:18-25

Explicit GameObject command handler invoked after each selected behavior tick.

Responsibilities:

  • Declare every stable service token handled by one explicitly composed component.
  • Apply emitted commands in deterministic queue order without per-step token lookup.

Does NOT:

  • Tick behavior, sample facts, or discover a default service implementation.

C#
System.Collections.Generic.IReadOnlyList<string> ServiceTokens { get; }

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/IBehaviorGameObjectCommandHandler.cs:21

Gets the stable authored service tokens claimed by this handler.

C#
void Handle(in BitQuirky.Behavior.ExternalService.ExternalServiceCommand command)

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/IBehaviorGameObjectCommandHandler.cs:24

Handles one emitted command for a claimed service.

Category: GameObject integration

C#
interface BitQuirky.Behavior.GameObject.IBehaviorGameObjectInputBinder

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/IBehaviorGameObjectInputBinder.cs:16-23

Explicit GameObject fact binder invoked before each selected behavior tick.

Responsibilities:

  • Resolve required typed fields once and sample current facts allocation-free per step.

Does NOT:

  • Tick behavior, dispatch commands, or discover scene dependencies.

Bind(BehaviorGameObjectBlackboardSchema schema)

Section titled “Bind(BehaviorGameObjectBlackboardSchema schema)”
C#
void Bind(BitQuirky.Behavior.GameObject.BehaviorGameObjectBlackboardSchema schema)

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/IBehaviorGameObjectInputBinder.cs:19

Resolves every field owned by this binder during agent composition.

C#
void Sample(Unity.Collections.NativeArray<byte> blackboard)

Source declaration: Packages/io.bitquirky.behavior/Runtime/GameObject/IBehaviorGameObjectInputBinder.cs:22

Samples current facts into the supplied blackboard before a tick.

Source fingerprint: sha256:ad0983d00d773d882bc61865e18d8c5559e009d181e5891575cd7f262515b23e

Full-size image