BitQuirky.Behavior.Diagnostics
Public behavior trees and state machines: runtime backend symbols in BitQuirky.Behavior.Diagnostics.
Source snapshot 29003d8b1658.
On this page
Assembly: BitQuirky.Behavior.Runtime.Backend
BehaviorTrace
Section titled “BehaviorTrace”Category: Low-level runtime
struct BitQuirky.Behavior.Diagnostics.BehaviorTraceSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:80-477
Always-on Behavior Trace for a single follower. Bounded, Burst-friendly
per-follower struct carrying eleven core 32-bit fields per
data-model.md §Behavior Trace (always-on tier): active-node-id,
current-state-id, last-transition-id, last-transition-cause-id,
last-result-code, pending-path-request-id, pending-animation-request-id,
authority-context-id, selected-probability-child-index,
last-evaluated-transition-predicate-id, and
last-evaluated-transition-right-field-id.
Responsibilities:
- Carry the bounded POD trace fields the diagnostic surface
(
follower.status,follower.behavior-report,follower.behavior-graph) projects out of the running graph. - Provide a Burst-callable projection from BehaviorRuntimeInstance+ a BehaviorTraceServiceBindingsbinding so callers can produce a trace snapshot from native data without touching the full runtime-instance layout.
- Stay native: the struct itself contains no managed references and is sized so it can be returned by value across Burst boundaries.
Does NOT:
- Allocate per-follower buffers - the trace is a snapshot; the storage lives onBehaviorRuntimeInstance.
- Lift to managed eagerly. R-11 mandates “lifted to managed only on demand”: the projection is run by the consumer when it actually needs to format a string or update a debugger view.
- Carry the high-detail ring buffer - that lives in
BehaviorTraceHighDetailRingin the optional instrumentation assembly and is opt-in by id.
Members
Section titled “Members”Authority
Section titled “Authority”public BitQuirky.Behavior.Baked.BakedAuthorityContext Authority { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:202-206
AuthorityContextIdas the strongly-typed enum.
CurrentUtilityBranchScore
Section titled “CurrentUtilityBranchScore”public float CurrentUtilityBranchScore { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:212-216
CurrentUtilityBranchScoreBitsreinterpreted as the active Utility Selector branch’s current score.
public static BitQuirky.Behavior.Diagnostics.BehaviorTrace Empty { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:222-250
All-zero / all-NoValue trace. Returned when no runtime instance is bound (e.g. follower has not spawned).
FinalResult
Section titled “FinalResult”public BitQuirky.Behavior.Execution.BehaviorMachineResult FinalResult { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:193-197
MachineResult as the strongly typed final result.
ResultCode
Section titled “ResultCode”public BitQuirky.Behavior.Execution.BehaviorResultCode ResultCode { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:186-190
LastResultCodeas the strongly-typed enum.
this[int fieldIndex]
Section titled “this[int fieldIndex]”public int this[int fieldIndex] { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:257-293
Read the trace’sFieldCountints by index. Used by marshalling code that wants to copy the trace into a fixed-size buffer without committing to the field layout.
ActiveMachineIndex
Section titled “ActiveMachineIndex”public int ActiveMachineIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:156
Current composed machine row; zero names the authoring host.
ActiveNodeIndex
Section titled “ActiveNodeIndex”public int ActiveNodeIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:101
Active baked-node index when the snapshot was taken, or NoValue when the follower has no node scheduled (just spawned, or just transitioned without an entry tick).
ActiveStateMachineCandidateIndex
Section titled “ActiveStateMachineCandidateIndex”public int ActiveStateMachineCandidateIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:154
Active candidate node, or NoValue while parked/outside.
ActiveStateMachineReferenceIndex
Section titled “ActiveStateMachineReferenceIndex”public int ActiveStateMachineReferenceIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:152
Active Referenced State Machine node, or NoValue.
ActiveUtilityBranchIndex
Section titled “ActiveUtilityBranchIndex”public int ActiveUtilityBranchIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:170
Row of the active Utility Selector’s currently running branch in the artifact’s utility-branch table, orNoValuebefore selection and after reset (research D-R1). Package-generic: it never carries a game’s tactic label.
AuthorityContextId
Section titled “AuthorityContextId”public int AuthorityContextIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:115
Authority the follower’s instance was attached under, as an int; Authority returns the typed value and Unknown means unattached.
CurrentStateIndex
Section titled “CurrentStateIndex”public int CurrentStateIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:103
Baked-node index of the active top-level statechart state, or NoValue when none is active.
CurrentUtilityBranchScoreBits
Section titled “CurrentUtilityBranchScoreBits”public int CurrentUtilityBranchScoreBitsSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:177
The active Utility Selector branch’s current score, packed as its raw 32-bit pattern; read it throughCurrentUtilityBranchScore. Left at NoValue’s bit pattern until an emitting phase populates it.
FieldCount
Section titled “FieldCount”public const int FieldCount = 26Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:88
Number of int-sized fields on the trace. Used to dimension fixed-size buffers in marshalling code.
HostedCompletedCycleCount
Section titled “HostedCompletedCycleCount”public int HostedCompletedCycleCountSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:136
Terminal hosted cycles completed since the active state was entered.
HostedLifetime
Section titled “HostedLifetime”public int HostedLifetimeSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:133
Baked lifetime of the active state-hosted behavior tree.
HostedResultCode
Section titled “HostedResultCode”public int HostedResultCodeSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:145
Terminal result of the latest hosted cycle.
HostedResultEventId
Section titled “HostedResultEventId”public int HostedResultEventIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:142
Pending or last emitted hosted result-event id, or 0 when the latest terminal hosted outcome had no configured event.
HostedResultTick
Section titled “HostedResultTick”public int HostedResultTickSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:164
Input tick that produced the held hosted result, or NoValue.
LastEvaluatedTransitionPredicateId
Section titled “LastEvaluatedTransitionPredicateId”public int LastEvaluatedTransitionPredicateIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:119
Stable hash of the graph field the most recently evaluated transition predicate read as its left operand, or NoValue when no predicate group has been evaluated. LastEvaluatedTransitionRightFieldId names the other operand.
LastEvaluatedTransitionRightFieldId
Section titled “LastEvaluatedTransitionRightFieldId”public int LastEvaluatedTransitionRightFieldIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:130
Stable hash of the graph value the last evaluated transition predicate compared against, orNoValuewhen that predicate used its baked constant or no predicate has been evaluated. Pair it with LastEvaluatedTransitionPredicateIdto distinguish those cases and name both operands of a deciding comparison. Resolve it with ResolveTransitionCauseSourceId, which reads the same authored field-name table.
LastResultCode
Section titled “LastResultCode”public int LastResultCodeSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:109
Result of the follower’s most recent step as an int, None before its first tick; ResultCode returns the typed value.
LastTransitionCauseId
Section titled “LastTransitionCauseId”public int LastTransitionCauseIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:107
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. Turn the field form back into a name with ResolveTransitionCauseSourceId.
LastTransitionId
Section titled “LastTransitionId”public int LastTransitionIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:105
Interned string index of the most recently fired transition’s authored id, or NoValue before any transition fires.
MachineFinished
Section titled “MachineFinished”public int MachineFinishedSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:150
One when the machine has stopped, including a no-result empty Return.
MachineResult
Section titled “MachineResult”public int MachineResultSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:148
Explicit final state-machine result, or None while execution remains active.
NestedMachinePhase
Section titled “NestedMachinePhase”public int NestedMachinePhaseSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:158
Current nested machine lifecycle phase.
NestedMachineResult
Section titled “NestedMachineResult”public int NestedMachineResultSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:160
Last nested machine result.
NoValue
Section titled “NoValue”public const int NoValue = -1Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:94
PendingAnimationRequestId
Section titled “PendingAnimationRequestId”public int PendingAnimationRequestIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:113
Pending command id of the request outstanding on the bound animation service, or NoValue when nothing is outstanding and when no animation service is bound.
PendingPathRequestId
Section titled “PendingPathRequestId”public int PendingPathRequestIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:111
Pending command id of the request outstanding on the bound path service, or NoValue when nothing is outstanding and when no path service is bound.
SelectedProbabilityChildIndex
Section titled “SelectedProbabilityChildIndex”public int SelectedProbabilityChildIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:117
Baked node index the active Probability Selector last drew, NoValue before a draw or after reset, or -2 when the selector drew its optional Direct failure outcome and ended the pass without ticking a child.
SuspensionDepth
Section titled “SuspensionDepth”public int SuspensionDepthSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:162
Current Push suspension depth.
Equals(in BehaviorTrace other)
Section titled “Equals(in BehaviorTrace other)”public bool Equals(in BitQuirky.Behavior.Diagnostics.BehaviorTrace other)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:401-427
Compares every trace field, so two snapshots differ only when something a debugger would draw has changed. Cheaper than repainting on every tick.
Equals(object obj)
Section titled “Equals(object obj)”public override bool Equals(object obj)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:433
Boxing equality; forwards toEqualswhen
objis a trace and returns false for anything else.
FromInstance(in BehaviorRuntimeInstance instance)
Section titled “FromInstance(in BehaviorRuntimeInstance instance)”public static BitQuirky.Behavior.Diagnostics.BehaviorTrace FromInstance(in BitQuirky.Behavior.Execution.BehaviorRuntimeInstance instance)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:363-364
Convenience overload that runs the projection with no pending- service bindings - all pending fields report NoValue. Used by tests + quick-look diagnostics.
FromInstance(in BehaviorRuntimeInstance instance, BehaviorTraceServiceBindings bindings)
Section titled “FromInstance(in BehaviorRuntimeInstance instance, BehaviorTraceServiceBindings bindings)”public static BitQuirky.Behavior.Diagnostics.BehaviorTrace FromInstance(in BitQuirky.Behavior.Execution.BehaviorRuntimeInstance instance, BitQuirky.Behavior.Diagnostics.BehaviorTraceServiceBindings bindings)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:304-356
Project a runtime instance + service bindings into the always-on trace shape. Pure: no mutation, no allocation. Burst-callable because every operation is a field read or a switch on a byte.
GetHashCode()
Section titled “GetHashCode()”public override int GetHashCode()Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:439-469
Hash over allFieldCounttrace fields, consistent with Equals.
ResolveTransitionCauseSourceId(BakedBehaviorArtifact artifact, int stableCauseId)
Section titled “ResolveTransitionCauseSourceId(BakedBehaviorArtifact artifact, int stableCauseId)”public static string ResolveTransitionCauseSourceId(BitQuirky.Behavior.Baked.BakedBehaviorArtifact artifact, int stableCauseId)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:369-391
Resolves a stable transition-cause field ID to its authored source field ID.
op_Equality(in BehaviorTrace a, in BehaviorTrace b)
Section titled “op_Equality(in BehaviorTrace a, in BehaviorTrace b)”public static bool operator ==(in BitQuirky.Behavior.Diagnostics.BehaviorTrace a, in BitQuirky.Behavior.Diagnostics.BehaviorTrace b)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:472
Field-by-field equality, identical to Equals.
op_Inequality(in BehaviorTrace a, in BehaviorTrace b)
Section titled “op_Inequality(in BehaviorTrace a, in BehaviorTrace b)”public static bool operator !=(in BitQuirky.Behavior.Diagnostics.BehaviorTrace a, in BitQuirky.Behavior.Diagnostics.BehaviorTrace b)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:474
True when any trace field differs between the two snapshots.
BehaviorTraceHighDetailEntry
Section titled “BehaviorTraceHighDetailEntry”Category: Low-level runtime
struct BitQuirky.Behavior.Diagnostics.BehaviorTraceHighDetailEntrySource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:71-109
One row in the high-detail ring buffer. Per
data-model.md §Behavior Trace (high-detail tier)each entry
is a(timestamp, node-id, kind, payload-id)tuple.
The struct stays POD so the ring is layout-stable across editor / dev player builds and so the entry can be appended without managed allocation when the recording path is hot.
Members
Section titled “Members”public BitQuirky.Behavior.Diagnostics.BehaviorTraceHighDetailKind KindSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:89
What this row records; it also selects how PayloadId is interpreted.
NodeIndex
Section titled “NodeIndex”public int NodeIndexSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:86
Baked-node index this entry refers to, or -1 when the entry is not node-scoped (e.g.AuthorityHandoff at instance scope).
PayloadId
Section titled “PayloadId”public int PayloadIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:108
Kind-specific payload id. Conventions:
- NodeEntered / NodeExited: parent-node-index (or -1).
- TickStarted / TickCompleted: BehaviorResultCode as int.
- TransitionFired: transition id (interned index).
- ExternalCommandIssued / Completed / Refused: pending-id.
- AuthorityHandoff: new-authority value cast to int.
- BlackboardWrite / Read: field-name interned index.
- ResultRecorded: BehaviorResultCode as int.
- SubgraphPushed / Popped: subgraph reference index.
Reserved0
Section titled “Reserved0”public byte Reserved0Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:91
Explicit padding that keeps the row layout stable across editor and dev-player builds; it carries no meaning.
Reserved1
Section titled “Reserved1”public ushort Reserved1Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:93
Explicit padding that keeps the row layout stable across editor and dev-player builds; it carries no meaning.
TimestampSeconds
Section titled “TimestampSeconds”public double TimestampSecondsSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:79
Wall-clock timestamp in seconds since some epoch the recorder
chose at activation time (typically Unity’s
Time.realtimeSinceStartupAsDouble). Monotonic within a
single activation - safe to subtract for deltas.
BehaviorTraceHighDetailKind
Section titled “BehaviorTraceHighDetailKind”Category: Low-level runtime
enum BitQuirky.Behavior.Diagnostics.BehaviorTraceHighDetailKindSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:14-60
Underlying type: byte
What a high-detail trace entry describes. Numeric values are stable so the editor debugger and any future trace dump format can decode archived traces consistently.
Members
Section titled “Members”AuthorityHandoff
Section titled “AuthorityHandoff”AuthorityHandoff = 9Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:44
Authority over the instance moved between roles.
BlackboardRead
Section titled “BlackboardRead”BlackboardRead = 11Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:50
A blackboard slot was read.
BlackboardWrite
Section titled “BlackboardWrite”BlackboardWrite = 10Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:47
A blackboard slot was written.
ExternalCommandCompleted
Section titled “ExternalCommandCompleted”ExternalCommandCompleted = 7Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:38
A posted external-service command came back with a completion record.
ExternalCommandIssued
Section titled “ExternalCommandIssued”ExternalCommandIssued = 6Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:35
An external-service command was posted to the command queue.
ExternalCommandRefused
Section titled “ExternalCommandRefused”ExternalCommandRefused = 8Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:41
An external-service command was rejected instead of accepted.
NodeEntered
Section titled “NodeEntered”NodeEntered = 1Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:20
Execution entered the entry’s node.
NodeExited
Section titled “NodeExited”NodeExited = 2Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:23
Execution left the entry’s node.
ResultRecorded
Section titled “ResultRecorded”ResultRecorded = 12Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:53
A node’s terminal result was recorded on the instance.
SubgraphPopped
Section titled “SubgraphPopped”SubgraphPopped = 14Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:59
A subgraph activation was popped off the instance’s stack.
SubgraphPushed
Section titled “SubgraphPushed”SubgraphPushed = 13Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:56
A subgraph activation was pushed onto the instance’s stack.
TickCompleted
Section titled “TickCompleted”TickCompleted = 4Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:29
A tick of the instance ended.
TickStarted
Section titled “TickStarted”TickStarted = 3Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:26
A tick of the instance began.
TransitionFired
Section titled “TransitionFired”TransitionFired = 5Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:32
A transition latched and moved the statechart to its target state.
Unknown
Section titled “Unknown”Unknown = 0Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTraceHighDetail.cs:17
The entry was never filled in; a decoder should skip it.
BehaviorTraceServiceBindings
Section titled “BehaviorTraceServiceBindings”Category: Low-level runtime
struct BitQuirky.Behavior.Diagnostics.BehaviorTraceServiceBindingsSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:22-45
Well-known service ids the always-on trace projects out of the runtime instance’s pending-external slots into named fields.
Service ids are interned indices into the baked artifact’s
ServiceNames table; FollowerBehaviorRuntimein Layer 3
resolves them at boot and hands the result here. -1 means the
adapter is not bound for this graph (the trace then reports -1 for
the corresponding pending field).
Members
Section titled “Members”public static BitQuirky.Behavior.Diagnostics.BehaviorTraceServiceBindings None { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:33-34
Sentinel used when no adapter has been resolved yet. Both fields are -1 so the projection emits -1 for each pending slot.
AnimationServiceId
Section titled “AnimationServiceId”public int AnimationServiceIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:27
Interned service id of the resolved animation adapter, or -1 when none is bound; the trace projects the pending slot waiting on it into PendingAnimationRequestId.
PathServiceId
Section titled “PathServiceId”public int PathServiceIdSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:25
Interned service id of the resolved path adapter, or -1 when none is bound; the trace projects the pending slot waiting on it into PendingPathRequestId.
BehaviorTraceServiceBindings(int pathServiceId, int animationServiceId)
Section titled “BehaviorTraceServiceBindings(int pathServiceId, int animationServiceId)”public BehaviorTraceServiceBindings(int pathServiceId, int animationServiceId)Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorTrace.cs:40-44
Binds the two adapters the trace projects by service id. Pass -1 for an adapter this graph does not use; its pending field then reportsNoValue.
BehaviorUtilityTraceEntry
Section titled “BehaviorUtilityTraceEntry”Category: Low-level runtime
struct BitQuirky.Behavior.Diagnostics.BehaviorUtilityTraceEntrySource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorUtilityTraceEntry.cs:30-51
One Utility Selector committed-branch change, captured on the exact tick it happens
(; contractper-agent-tactic-observation.md§Structured Tracing; research
D-R10). Self-contained so a caller that retains a sequence of these across ticks can read
what changed without re-polling the liveBehaviorUtilityBranchScorebuffer,
which the next tick’s computation overwrites.
Responsibilities:
- Carry the previously committed branch’s source order (orNoBranchbefore any selection), the newly committed branch’s source order (orNoBranch when the selector now commits to nothing), every branch’s current score in source order from that same tick’s computation, and the tick’s frame number.
- Stay POD and Burst-friendly: a fixed inline score capacity sized to the Utility Selector’s own 64-branch candidate-mask ceiling, no managed allocation.
Does NOT:
- Carry a tactic label, an entity id, or any other game-owned identity: the owning game maps branch source order to its own labels (constitution Principle II).
- Get produced for a tick where the committed branch is unchanged:
BitQuirky.Behavior.Nodes.Composite.UtilitySelector.TryBuildTraceEntryreturns one only when the committed branch actually moved.
Members
Section titled “Members”BranchScores
Section titled “BranchScores”public Unity.Collections.FixedList512Bytes<float> BranchScoresSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorUtilityTraceEntry.cs:50
Every branch’s current score, indexed by source order, from the same tick’s computation.
public int FrameSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorUtilityTraceEntry.cs:47
The tick’s frame number this change was captured on.
NewBranchSourceOrder
Section titled “NewBranchSourceOrder”public int NewBranchSourceOrderSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorUtilityTraceEntry.cs:44
The branch committed after this change, or NoBranch when the selector now commits to nothing.
NoBranch
Section titled “NoBranch”public const int NoBranch = -1Source declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorUtilityTraceEntry.cs:38
Sentinel meaning “no branch is committed”: before any selection (PreviousBranchSourceOrder) or when the selector commits to nothing on either side of the change.
PreviousBranchSourceOrder
Section titled “PreviousBranchSourceOrder”public int PreviousBranchSourceOrderSource declaration: Packages/io.bitquirky.behavior/Runtime/Backend/Diagnostics/BehaviorUtilityTraceEntry.cs:41
The branch committed before this change, or NoBranch for the very first selection.
Source fingerprint: sha256:29003d8b1658b98a79bebcd93e3b4030caf8511268b96817ab764d63df8d6c3b