BitQuirky.Behavior.Blackboard
Public behavior trees and state machines: runtime symbols in BitQuirky.Behavior.Blackboard.
Source snapshot 29003d8b1658.
On this page
Assembly: BitQuirky.Behavior.Runtime
BehaviorManagedBlackboardTemplate
Section titled “BehaviorManagedBlackboardTemplate”Category: Blackboards
class BitQuirky.Behavior.Blackboard.BehaviorManagedBlackboardTemplateSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:25-362
Inherits: ScriptableObject
Product-owned non-generic base of every generated typed companion template.
Responsibilities:
- Carry the exact generated binding-set fingerprint and the dense managed slot count, so an agent can prove the imported template belongs to the graph it is running.
- Supply the clone boundary that gives one GameObject graph instance its own independently mutable value graph, and the preallocated per-slot versions the binding runtime reads without allocating or boxing.
- Restore an agent’s own clone to the authored starting values on reset without replacing the companion instance the generated provider already holds.
Does NOT:
- Expose managed values as
object, discover project types, execute graph control flow, or act as source authority. The imported instance is a derived cache; canonical format 1.3 text remains authoritative.
Members
Section titled “Members”BindingSetFingerprint
Section titled “BindingSetFingerprint”public ulong BindingSetFingerprint { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:53
Gets the binding-set fingerprint this template was generated for.
GraphIdentity
Section titled “GraphIdentity”public string GraphIdentity { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:59
Gets the exact source graph identity this template was generated from.
IsAgentClone
Section titled “IsAgentClone”public bool IsAgentClone { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:62
Gets whether this instance is one agent’s independently mutable clone.
ManagedSlotCount
Section titled “ManagedSlotCount”public int ManagedSlotCount { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:56
Gets the dense managed slot count the generated companion declares.
AdoptMachineValues(BehaviorManagedBlackboardTemplate source, int machineIndex)
Section titled “AdoptMachineValues(BehaviorManagedBlackboardTemplate source, int machineIndex)”protected abstract void AdoptMachineValues(BitQuirky.Behavior.Blackboard.BehaviorManagedBlackboardTemplate source, int machineIndex)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:227-228
Deep-copies and adopts only the exact typed serialized fields owned by one machine. Generated implementations reject a machine that owns no managed companion slot.
AdoptValues(BehaviorManagedBlackboardTemplate source)
Section titled “AdoptValues(BehaviorManagedBlackboardTemplate source)”protected abstract void AdoptValues(BitQuirky.Behavior.Blackboard.BehaviorManagedBlackboardTemplate source)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:221
Takes ownership of every managed slot value from a freshly instantiated deep copy. The generated override assigns each exact typed field, so this instance owns value graphs that nothing else references.
BumpSlotVersion(int slotIndex)
Section titled “BumpSlotVersion(int slotIndex)”public void BumpSlotVersion(int slotIndex)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:169-175
Records that one dense managed slot changed. Generated setters call this after writing a typed field; it never allocates and never boxes.
CreateAgentClone()
Section titled “CreateAgentClone()”public BitQuirky.Behavior.Blackboard.BehaviorManagedBlackboardTemplate CreateAgentClone()Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:86-95
Creates one agent’s independently mutable clone. Unity’s instantiate deep-copies every serialized array, list, inline class, and polymorphic managed reference, and keeps an asset reference pointing at the same asset, so two agents mutating the same logical slot never share a mutable graph.
DeepCloneMachineValues<T>(T values)
Section titled “DeepCloneMachineValues<T>(T values)”protected static T DeepCloneMachineValues<T>(T values) where T : UnityEngine.ScriptableObjectSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:235-242
Deep-copies one generated machine-value envelope through Unity serialization. The envelope contains only fields owned by that machine, so unrelated mutable graphs are neither copied nor replaced.
DestroyMachineValues(ScriptableObject values)
Section titled “DestroyMachineValues(ScriptableObject values)”protected static void DestroyMachineValues(UnityEngine.ScriptableObject values)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:245-248
Releases one temporary generated machine-value envelope.
DisposeClone()
Section titled “DisposeClone()”public void DisposeClone()Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:202-210
Releases the clone. The imported template itself is never destroyed here.
MatchDeclaredValueOrdinal(int slotIndex, string[] candidates, int start, int count)
Section titled “MatchDeclaredValueOrdinal(int slotIndex, string[] candidates, int start, int count)”public virtual int MatchDeclaredValueOrdinal(int slotIndex, string[] candidates, int start, int count)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:195-199
Decides which of an ordered candidate range one GameObject-path slot currently equals, returning the one-based candidate ordinal or zero when none of them matches. Generated companions override this with a dense switch that compares text by ordinal equality and a reference by identity, so the shared evaluation core decides a transition predicate from a native word and never reads a managed value. A candidate entry is either the exact text a slot must equal, or null for the reserved no-value literal.
OnValuesChanged()
Section titled “OnValuesChanged()”protected virtual void OnValuesChanged()Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:332-334
Rebuilds any non-serialized runtime view of the serialized values, such as the lookup a dictionary slot exposes. The base implementation does nothing.
ReadUnityObjectSlot(int slotIndex)
Section titled “ReadUnityObjectSlot(int slotIndex)”public virtual UnityEngine.Object ReadUnityObjectSlot(int slotIndex)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:182-185
Reads a directly declared single Unity-object slot for dynamic member targeting. Generated companions override this with a dense switch over eligible fields. Other managed value kinds return null and are rejected before bake.
RefuseDuplicateKey(string variableName, int authoredOrder)
Section titled “RefuseDuplicateKey(string variableName, int authoredOrder)”protected static void RefuseDuplicateKey(string variableName, int authoredOrder)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:319-326
Refuses a dictionary slot whose saved keys are not unique under the declared key type’s equality, so no authored entry is silently merged away.
RequireBacking<TDeclared>(TDeclared value, string variableName)
Section titled “RequireBacking<TDeclared>(TDeclared value, string variableName)”protected static UnityEngine.Object RequireBacking<TDeclared>(TDeclared value, string variableName) where TDeclared : classSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:278-294
Writes one exact declared interface or abstract base value into its Unity object backing field. A value that is not a Unity object is refused, because the declared slot holds a satisfying component, project asset, or no value.
RequireDeclared<TDeclared>(Object backing, string variableName)
Section titled “RequireDeclared<TDeclared>(Object backing, string variableName)”protected static TDeclared RequireDeclared<TDeclared>(UnityEngine.Object backing, string variableName) where TDeclared : classSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:255-271
Reads one Unity object backing field as the exact declared interface or abstract base. A backing object that does not satisfy the declared identity is refused with its exact coordinates rather than read as no value.
RequirePairedColumns(int keyCount, int valueCount, string variableName)
Section titled “RequirePairedColumns(int keyCount, int valueCount, string variableName)”protected static void RequirePairedColumns(int keyCount, int valueCount, string variableName)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:300-313
Refuses a dictionary slot whose saved key and value columns disagree, so a generated lookup is never rebuilt from a partial pair set.
ResetMachineToTemplate(BehaviorManagedBlackboardTemplate template, int machineIndex)
Section titled “ResetMachineToTemplate(BehaviorManagedBlackboardTemplate template, int machineIndex)”public void ResetMachineToTemplate(BitQuirky.Behavior.Blackboard.BehaviorManagedBlackboardTemplate template, int machineIndex)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:138-157
Restores only the managed slots owned by one composed machine to their effective authored values. Generated companions deep-copy only that machine’s mutable serialized values and preserve every parent and sibling slot on this agent clone. A machine without managed slots leaves the companion unchanged.
ResetToTemplate(BehaviorManagedBlackboardTemplate template)
Section titled “ResetToTemplate(BehaviorManagedBlackboardTemplate template)”public void ResetToTemplate(BitQuirky.Behavior.Blackboard.BehaviorManagedBlackboardTemplate template)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:102-130
Restores this clone to the authored starting values without replacing the companion instance the generated provider already holds. Each running instance keeps its own copy, so resetting never edits the asset.
SetTemplateIdentity(string graphIdentity, ulong bindingSetFingerprint, int managedSlotCount)
Section titled “SetTemplateIdentity(string graphIdentity, ulong bindingSetFingerprint, int managedSlotCount)”public void SetTemplateIdentity(string graphIdentity, ulong bindingSetFingerprint, int managedSlotCount)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:68-78
Records the generated template identity. Import convergence refreshes it whenever the graph’s binding-set fingerprint or managed slot layout changes.
SlotVersion(int slotIndex)
Section titled “SlotVersion(int slotIndex)”public int SlotVersion(int slotIndex)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedBlackboardTemplate.cs:160-163
Reads the monotonic version of one dense managed slot.
BehaviorManagedFieldSerialization
Section titled “BehaviorManagedFieldSerialization”Category: Blackboards
class BitQuirky.Behavior.Blackboard.BehaviorManagedFieldSerializationSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedFieldSerialization.cs:15-114
Responsibilities: retain Guid leaves and collection identity indices for generated exact field walks at Unity serialization boundaries, and terminate ancestor cycles by identity. Does NOT: discover fields or types, invoke customer members, or participate in graph ticks.
Members
Section titled “Members”IsRestoring
Section titled “IsRestoring”public bool IsRestoring { get; private set; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedFieldSerialization.cs:28
Gets whether the current boundary restores a previously captured value graph.
Begin(bool restoring)
Section titled “Begin(bool restoring)”public bool Begin(bool restoring)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedFieldSerialization.cs:31-45
Starts one boundary; an unpopulated derived cache has no fields to restore.
public void End()Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedFieldSerialization.cs:107-113
Checks that a restored graph consumed the exact generated capture layout.
Enter(object value)
Section titled “Enter(object value)”public bool Enter(object value)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedFieldSerialization.cs:90-101
Enters a nonnull reference unless it already occurs on this ancestor path.
Exit()
Section titled “Exit()”public void Exit()Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedFieldSerialization.cs:104
Leaves the most recently entered reference.
ReadReference()
Section titled “ReadReference()”public int ReadReference()Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedFieldSerialization.cs:64
Reads the next typed collection-table index.
Transfer(ref Guid value)
Section titled “Transfer(ref Guid value)”public void Transfer(ref System.Guid value)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedFieldSerialization.cs:48-58
Transfers one Guid leaf in the deterministic generated field order.
TransferReference<T>(ref T value)
Section titled “TransferReference<T>(ref T value)”public void TransferReference<T>(ref T value) where T : classSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedFieldSerialization.cs:67-87
Retains the exact customer reference, including null, aliases and concrete type.
WriteReference(int index)
Section titled “WriteReference(int index)”public void WriteReference(int index)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedFieldSerialization.cs:61
Records one typed collection-table index, including minus one for null.
BehaviorSerializationReferenceComparer<T>
Section titled “BehaviorSerializationReferenceComparer<T>”Category: Blackboards
class BitQuirky.Behavior.Blackboard.BehaviorSerializationReferenceComparer<T> where T : classSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedFieldSerialization.cs:120-127
Implements: IEqualityComparer<T>
Responsibilities: compare generated collection-table keys by reference identity. Does NOT: call customer equality implementations or retain collection instances.
Members
Section titled “Members”Equals(T left, T right)
Section titled “Equals(T left, T right)”public bool Equals(T left, T right)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedFieldSerialization.cs:123
Compares two references without invoking their value equality.
GetHashCode(T value)
Section titled “GetHashCode(T value)”public int GetHashCode(T value)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedFieldSerialization.cs:126
Gets the stable identity hash of one collection reference.
BehaviorSerializedGuid
Section titled “BehaviorSerializedGuid”Category: Blackboards
struct BitQuirky.Behavior.Blackboard.BehaviorSerializedGuidSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorSerializedGuid.cs:21-50
Product-owned Unity serialization backing for generated Guid leaves. Customer declarations
and accessors retainGuidrather than this storage representation.
Responsibilities:
- Preserve every Guid bit across Unity serialization boundaries.
- Keep the serialized halves in Guid byte-array order, each decoded as little-endian.
Does NOT:
- Replace customer Guid types or define their authoring syntax.
Members
Section titled “Members”public readonly System.Guid Value { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorSerializedGuid.cs:39-49
Restores the Guid from its stable serialized byte order.
BehaviorSerializedGuid(Guid value)
Section titled “BehaviorSerializedGuid(Guid value)”public BehaviorSerializedGuid(System.Guid value)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorSerializedGuid.cs:28-36
Stores all sixteen Guid bytes without a managed allocation.
Source fingerprint: sha256:29003d8b1658b98a79bebcd93e3b4030caf8511268b96817ab764d63df8d6c3b