BitQuirky.Behavior.Blackboard
Public behavior trees and state machines: runtime symbols in BitQuirky.Behavior.Blackboard.
Source snapshot ad0983d00d77.
On this page
Assembly: BitQuirky.Behavior.Runtime
BehaviorBlackboardChangeWriter
Section titled “BehaviorBlackboardChangeWriter”Category: Blackboards
class BitQuirky.Behavior.Blackboard.BehaviorBlackboardChangeWriterSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:131-617
Central typed writer for member-bound blackboard slots with per-slot versions, an ordered change journal, and reentrancy generations.
Responsibilities:
- Apply exact non-boxing typed writes to a member-bound native blackboard slot, bump the slot’s monotonic version, and record the write in a preallocated ordered journal with a monotonic per-agent sequence.
- Read and write every carried category in its own unmanaged type, including a project-defined struct whose fields are all unmanaged, and the elements and live length of a carried collection buffer, using the exact layout both agent surfaces share.
- Assign and expose per-slot reentrancy generations so a synchronous notification caused by a push acknowledges the generation without emitting a second change.
Does NOT:
- Read scene state, invoke members, decide synchronization direction, or allocate on the write path; the binding runtime drives ordering and direction.
Members
Section titled “Members”JournalCount
Section titled “JournalCount”public int JournalCount { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:191
Gets the number of ordered writes recorded since the last journal clear.
BufferCountHeaderSize
Section titled “BufferCountHeaderSize”public static readonly int BufferCountHeaderSizeSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:137-138
Bytes the carried-collection element-count header occupies ahead of the elements. It is the exact header the baker encodes, so both agent surfaces agree byte for byte.
BehaviorBlackboardChangeWriter(NativeArray<byte> blackboard, int slotCount, int journalCapacity, Action<int, BehaviorBlackboardWriteOrigin> writeHandler)
Section titled “BehaviorBlackboardChangeWriter(NativeArray<byte> blackboard, int slotCount, int journalCapacity, Action<int, BehaviorBlackboardWriteOrigin> writeHandler)”public BehaviorBlackboardChangeWriter(Unity.Collections.NativeArray<byte> blackboard, int slotCount, int journalCapacity = -1, System.Action<int, BitQuirky.Behavior.Blackboard.BehaviorBlackboardWriteOrigin> writeHandler = null)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:157-188
Creates a change writer over one agent’s native blackboard, sized to hold at most one journal entry per blackboard slot per selected tick.
BeginReentrancy(int slotIndex)
Section titled “BeginReentrancy(int slotIndex)”public uint BeginReentrancy(int slotIndex)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:239-248
Begins a new reentrancy generation for the slot before a push setter call.
ClearJournal()
Section titled “ClearJournal()”public void ClearJournal()Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:603-606
Clears the per-tick journal without resetting slot versions.
ElementCount(in BakedCarriedCollectionBuffer buffer)
Section titled “ElementCount(in BakedCarriedCollectionBuffer buffer)”public int ElementCount(in BitQuirky.Behavior.Baked.BakedCarriedCollectionBuffer buffer)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:465-473
Reads the live element count of a carried collection buffer.
EndReentrancy(int slotIndex)
Section titled “EndReentrancy(int slotIndex)”public void EndReentrancy(int slotIndex)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:251-257
Clears the reentrancy generation after a push setter call returns.
LastOrigin(int slotIndex)
Section titled “LastOrigin(int slotIndex)”public BitQuirky.Behavior.Blackboard.BehaviorBlackboardWriteOrigin LastOrigin(int slotIndex)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:208-213
Gets the origin of the most recent write to the slot.
ReadBits(in BakedBlackboardSlot slot)
Section titled “ReadBits(in BakedBlackboardSlot slot)”public long ReadBits(in BitQuirky.Behavior.Baked.BakedBlackboardSlot slot)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:348-358
Reads exact little-endian value bits from a native slot.
ReadBytes(in BakedBlackboardSlot slot, byte[] destination, int destinationOffset)
Section titled “ReadBytes(in BakedBlackboardSlot slot, byte[] destination, int destinationOffset)”public void ReadBytes(in BitQuirky.Behavior.Baked.BakedBlackboardSlot slot, byte[] destination, int destinationOffset)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:374-395
Copies one native slot into caller-owned reusable storage.
ReadElement<T>(in BakedCarriedCollectionBuffer buffer, int elementIndex)
Section titled “ReadElement<T>(in BakedCarriedCollectionBuffer buffer, int elementIndex)”public T ReadElement<T>(in BitQuirky.Behavior.Baked.BakedCarriedCollectionBuffer buffer, int elementIndex) where T : unmanagedSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:434-441
Reads one exact unmanaged element of a carried collection buffer. The buffer holds a four-byte element-count header followed by the authored elements at one deterministic stride, which is the same layout both agent surfaces read.
Element access is bounded by the buffer’s authored capacity, not by its live element count: the storage exists for every capacity slot, so reading beyond the live count returns whatever that slot last held rather than refusing. Callers that mean “the elements currently in the collection” bound their own loop with ElementCount.
ReadJournalEntry(int index, out int slotIndex, out uint sequence)
Section titled “ReadJournalEntry(int index, out int slotIndex, out uint sequence)”public void ReadJournalEntry(int index, out int slotIndex, out uint sequence)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:216-220
Reads one recorded journal entry in write order.
ReadJournalEntry(int index, out int slotIndex, out uint sequence, out BehaviorBlackboardWriteOrigin origin, out bool hasValue, out long valueBits)
Section titled “ReadJournalEntry(int index, out int slotIndex, out uint sequence, out BehaviorBlackboardWriteOrigin origin, out bool hasValue, out long valueBits)”public void ReadJournalEntry(int index, out int slotIndex, out uint sequence, out BitQuirky.Behavior.Blackboard.BehaviorBlackboardWriteOrigin origin, out bool hasValue, out long valueBits)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:223-236
Reads one recorded journal entry including its origin and value snapshot.
ReadUpperBits(in BakedBlackboardSlot slot)
Section titled “ReadUpperBits(in BakedBlackboardSlot slot)”public long ReadUpperBits(in BitQuirky.Behavior.Baked.BakedBlackboardSlot slot)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:361-371
Reads bytes eight through fifteen of one little-endian native slot.
ReadValue<T>(in BakedBlackboardSlot slot)
Section titled “ReadValue<T>(in BakedBlackboardSlot slot)”public T ReadValue<T>(in BitQuirky.Behavior.Baked.BakedBlackboardSlot slot) where T : unmanagedSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:403-406
Reads one exact unmanaged value out of a native slot in its own type, with no boxing
and no intermediate byte buffer. Numbers,bool, char, enums, UnityEngine
value structs, and project-defined structs whose fields are all unmanaged all read
through this one route on both agent surfaces.
Record(int slotIndex, BehaviorBlackboardWriteOrigin origin)
Section titled “Record(int slotIndex, BehaviorBlackboardWriteOrigin origin)”public void Record(int slotIndex, BitQuirky.Behavior.Blackboard.BehaviorBlackboardWriteOrigin origin)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:503-506
Records a version bump and journal entry for a slot changed elsewhere.
ReentrancyGeneration(int slotIndex)
Section titled “ReentrancyGeneration(int slotIndex)”public uint ReentrancyGeneration(int slotIndex)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:200-205
Gets the reentrancy generation currently assigned to the slot.
Reset()
Section titled “Reset()”public void Reset()Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:609-616
Resets versions, journal, and reentrancy generations for a runtime reset.
Version(int slotIndex)
Section titled “Version(int slotIndex)”public int Version(int slotIndex)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:194-197
Gets the current monotonic version of the slot.
WriteBits(int slotIndex, in BakedBlackboardSlot slot, long bits, BehaviorBlackboardWriteOrigin origin)
Section titled “WriteBits(int slotIndex, in BakedBlackboardSlot slot, long bits, BehaviorBlackboardWriteOrigin origin)”public void WriteBits(int slotIndex, in BitQuirky.Behavior.Baked.BakedBlackboardSlot slot, long bits, BitQuirky.Behavior.Blackboard.BehaviorBlackboardWriteOrigin origin)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:260-278
Writes exact little-endian value bits into a native slot and records the change.
WriteBytes(int slotIndex, in BakedBlackboardSlot slot, byte[] source, int sourceOffset, int valueSize, BehaviorBlackboardWriteOrigin origin)
Section titled “WriteBytes(int slotIndex, in BakedBlackboardSlot slot, byte[] source, int sourceOffset, int valueSize, BehaviorBlackboardWriteOrigin origin)”public void WriteBytes(int slotIndex, in BitQuirky.Behavior.Baked.BakedBlackboardSlot slot, byte[] source, int sourceOffset, int valueSize, BitQuirky.Behavior.Blackboard.BehaviorBlackboardWriteOrigin origin)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:311-345
Writes an exact unmanaged value from reusable storage into its native slot without allocating, clears any baked padding bytes, and records the change.
WriteElement<T>(in BakedCarriedCollectionBuffer buffer, int elementIndex, T value, BehaviorBlackboardWriteOrigin origin)
Section titled “WriteElement<T>(in BakedCarriedCollectionBuffer buffer, int elementIndex, T value, BehaviorBlackboardWriteOrigin origin)”public void WriteElement<T>(in BitQuirky.Behavior.Baked.BakedCarriedCollectionBuffer buffer, int elementIndex, T value, BitQuirky.Behavior.Blackboard.BehaviorBlackboardWriteOrigin origin) where T : unmanagedSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:449-462
Writes one exact unmanaged element of a carried collection buffer and records the change against the owning slot. As withReadElement, the authored capacity bounds the index; writing at or beyond the live element count stages a value that only becomes visible onceWriteElementCountgrows the count.
WriteElementCount(in BakedCarriedCollectionBuffer buffer, int elementCount, BehaviorBlackboardWriteOrigin origin)
Section titled “WriteElementCount(in BakedCarriedCollectionBuffer buffer, int elementCount, BehaviorBlackboardWriteOrigin origin)”public void WriteElementCount(in BitQuirky.Behavior.Baked.BakedCarriedCollectionBuffer buffer, int elementCount, BitQuirky.Behavior.Blackboard.BehaviorBlackboardWriteOrigin origin)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:480-500
Writes the live element count of a carried collection buffer and records the change. The authored count is the buffer’s capacity, so a longer count is refused rather than silently clamped.
WriteValue<T>(int slotIndex, in BakedBlackboardSlot slot, T value, BehaviorBlackboardWriteOrigin origin)
Section titled “WriteValue<T>(int slotIndex, in BakedBlackboardSlot slot, T value, BehaviorBlackboardWriteOrigin origin)”public void WriteValue<T>(int slotIndex, in BitQuirky.Behavior.Baked.BakedBlackboardSlot slot, T value, BitQuirky.Behavior.Blackboard.BehaviorBlackboardWriteOrigin origin) where T : unmanagedSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:412-421
Writes one exact unmanaged value into a native slot in its own type, clears any baked padding bytes, and records the change without allocating or boxing.
WriteWideBits(int slotIndex, in BakedBlackboardSlot slot, long bits, long upperBits, BehaviorBlackboardWriteOrigin origin)
Section titled “WriteWideBits(int slotIndex, in BakedBlackboardSlot slot, long bits, long upperBits, BehaviorBlackboardWriteOrigin origin)”public void WriteWideBits(int slotIndex, in BitQuirky.Behavior.Baked.BakedBlackboardSlot slot, long bits, long upperBits, BitQuirky.Behavior.Blackboard.BehaviorBlackboardWriteOrigin origin)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:284-305
Writes up to sixteen exact little-endian value bytes into a native slot and records the lower word in the bounded change journal.
BehaviorBlackboardSynchronizationArbiter
Section titled “BehaviorBlackboardSynchronizationArbiter”Category: Blackboards
class BitQuirky.Behavior.Blackboard.BehaviorBlackboardSynchronizationArbiterSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:57-111
The portable last-writer arbitration every member synchronization pass applies, stated as pure decisions over exact value bits so both object models agree on which writer wins.
Responsibilities:
- Decide whether a member-side read is a new change worth emitting, whether a blackboard slot changed since its last synchronized baseline and must push, and whether an authored notification fired, using only recorded baselines and observed values. On a two-way binding the member value is compared against the last synchronized baseline, so a value this runtime itself pushed is acknowledged rather than echoed back as a second change, and a slot the game wrote keeps its later write until the push delivers it.
Does NOT:
- Invoke a member, write a slot, assign a sequence, or hold any state. Callers own their baselines and sequences; these are the shared rules and nothing else.
Members
Section titled “Members”NotificationFired(bool initialized, uint observedVersion, uint lastObservedVersion)
Section titled “NotificationFired(bool initialized, uint observedVersion, uint lastObservedVersion)”public static bool NotificationFired(bool initialized, uint observedVersion, uint lastObservedVersion)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:106-110
Decides whether one authored notification fired since it was last observed. The first observation after initialization always fires so the current value is read once.
ShouldEmitMemberChange(bool initialized, bool twoWay, long producedBits, long producedUpperBits, long baselineBits, long baselineUpperBits, long slotBits, long slotUpperBits)
Section titled “ShouldEmitMemberChange(bool initialized, bool twoWay, long producedBits, long producedUpperBits, long baselineBits, long baselineUpperBits, long slotBits, long slotUpperBits)”public static bool ShouldEmitMemberChange(bool initialized, bool twoWay, long producedBits, long producedUpperBits, long baselineBits, long baselineUpperBits, long slotBits, long slotUpperBits)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:65-84
Decides whether one member-side read is emitted into the blackboard as a change. The first read after initialization always emits, a two-way binding emits only when the member moved from the last synchronized baseline (echo suppression), and a one-way member-to-blackboard binding reasserts the member whenever the slot differs.
ShouldPush(bool initialized, long slotBits, long slotUpperBits, long baselineBits, long baselineUpperBits)
Section titled “ShouldPush(bool initialized, long slotBits, long slotUpperBits, long baselineBits, long baselineUpperBits)”public static bool ShouldPush(bool initialized, long slotBits, long slotUpperBits, long baselineBits, long baselineUpperBits)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:91-100
Decides whether one blackboard slot pushes to its writable member: only after the baseline was initialized, and only when the slot moved from that baseline, so an authored default is never pushed as if the core had just written it.
BehaviorBlackboardWriteOrigin
Section titled “BehaviorBlackboardWriteOrigin”Category: Blackboards
enum BitQuirky.Behavior.Blackboard.BehaviorBlackboardWriteOriginSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:14-39
Underlying type: byte
Origin of one recorded blackboard change, used to order and audit member synchronization.
Members
Section titled “Members”External
Section titled “External”External = 5Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:32
A write made by game code through the agent’s central blackboard writer.
LiveEdit
Section titled “LiveEdit”LiveEdit = 6Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:38
One accepted Live member edit committed by the member binding runtime after its generated setter succeeded. It records the change without asking for a second push.
MemberNotification
Section titled “MemberNotification”MemberNotification = 2Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:23
A member-to-blackboard notification callback.
MemberPoll
Section titled “MemberPoll”MemberPoll = 1Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:20
A member-to-blackboard poll of a bound getter.
MemberPush
Section titled “MemberPush”MemberPush = 4Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:29
A blackboard-to-member push acknowledgement of the synchronized value.
MemberResult
Section titled “MemberResult”MemberResult = 3Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:26
An immediate member operation result written by the shared core microstep.
None = 0Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorBlackboardChangeWriter.cs:17
No recorded write.
BehaviorEntityBlackboardCollectionStore
Section titled “BehaviorEntityBlackboardCollectionStore”Category: Blackboards
class BitQuirky.Behavior.Blackboard.BehaviorEntityBlackboardCollectionStoreSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorEntityBlackboardCollectionStore.cs:82-528
Per-instance storage for every declared list and array the entity path carries.
Responsibilities:
- State the byte size one instance reserves at attachment, and copy the artifact’s authored starting contents into that instance’s own buffer in authored order, so two graph instances of one asset never share a byte.
- Read, write, append to, and shorten one collection through its exact element width, growing the instance’s own buffer when an append passes the current capacity.
- Restore the authored starting contents on reset and graph replacement.
Does NOT:
- Allocate managed memory, write the baked artifact, reach another entity’s storage, reorder or coerce an element, or participate in the steady-state tick. Every operation here is an explicit instance-local edit.
Members
Section titled “Members”GetElementCount(DynamicBuffer<BehaviorEntityCollectionRange> ranges, int row)
Section titled “GetElementCount(DynamicBuffer<BehaviorEntityCollectionRange> ranges, int row)”public static int GetElementCount(Unity.Entities.DynamicBuffer<BitQuirky.Behavior.Blackboard.BehaviorEntityCollectionRange> ranges, int row)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorEntityBlackboardCollectionStore.cs:250-254
Gets how many elements one collection holds right now, or -1 for no row.
Initialize(NativeArray<BakedBlackboardEntityCollection> collections, NativeArray<byte> initialBytes, DynamicBuffer<BehaviorEntityCollectionRange> ranges, DynamicBuffer<BehaviorEntityCollectionByte> data)
Section titled “Initialize(NativeArray<BakedBlackboardEntityCollection> collections, NativeArray<byte> initialBytes, DynamicBuffer<BehaviorEntityCollectionRange> ranges, DynamicBuffer<BehaviorEntityCollectionByte> data)”public static void Initialize(Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedBlackboardEntityCollection> collections, Unity.Collections.NativeArray<byte> initialBytes, Unity.Entities.DynamicBuffer<BitQuirky.Behavior.Blackboard.BehaviorEntityCollectionRange> ranges, Unity.Entities.DynamicBuffer<BitQuirky.Behavior.Blackboard.BehaviorEntityCollectionByte> data)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorEntityBlackboardCollectionStore.cs:194-243
Copies the artifact’s authored starting contents into one instance’s own storage in authored order and rebuilds its ranges. Every instance that initializes from the same artifact starts identical and diverges only through its own later edits.
RequiredByteSize(NativeArray<BakedBlackboardEntityCollection> collections)
Section titled “RequiredByteSize(NativeArray<BakedBlackboardEntityCollection> collections)”public static int RequiredByteSize(Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedBlackboardEntityCollection> collections)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorEntityBlackboardCollectionStore.cs:97-142
Computes the byte size one instance reserves for every declared collection’s authored starting contents. A graph carrying no collection reserves nothing.
RowCount(NativeArray<BakedBlackboardEntityCollection> collections)
Section titled “RowCount(NativeArray<BakedBlackboardEntityCollection> collections)”public static int RowCount(Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedBlackboardEntityCollection> collections)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorEntityBlackboardCollectionStore.cs:145-148
Gets how many collection rows one instance carries.
TryAppendElement<T>(DynamicBuffer<BehaviorEntityCollectionRange> ranges, DynamicBuffer<BehaviorEntityCollectionByte> data, int row, T value)
Section titled “TryAppendElement<T>(DynamicBuffer<BehaviorEntityCollectionRange> ranges, DynamicBuffer<BehaviorEntityCollectionByte> data, int row, T value)”public static bool TryAppendElement<T>(Unity.Entities.DynamicBuffer<BitQuirky.Behavior.Blackboard.BehaviorEntityCollectionRange> ranges, Unity.Entities.DynamicBuffer<BitQuirky.Behavior.Blackboard.BehaviorEntityCollectionByte> data, int row, T value) where T : unmanagedSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorEntityBlackboardCollectionStore.cs:331-379
Appends one element to this instance’s own copy, growing its storage when the append passes the current capacity. Growth relocates only the collection being grown, so every other collection of the instance keeps its offset and its bytes.
TryFindRow(NativeArray<BakedBlackboardEntityCollection> collections, int blackboardSlotIndex, out int row)
Section titled “TryFindRow(NativeArray<BakedBlackboardEntityCollection> collections, int blackboardSlotIndex, out int row)”public static bool TryFindRow(Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedBlackboardEntityCollection> collections, int blackboardSlotIndex, out int row)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorEntityBlackboardCollectionStore.cs:154-183
Finds the row that carries one blackboard slot. Rows are published in slot order, so this is a binary search and never a scan of the whole table.
TryGetShape(DynamicBuffer<BehaviorEntityCollectionRange> ranges, int row, out BehaviorDeclaredValueShape shape)
Section titled “TryGetShape(DynamicBuffer<BehaviorEntityCollectionRange> ranges, int row, out BehaviorDeclaredValueShape shape)”public static bool TryGetShape(Unity.Entities.DynamicBuffer<BitQuirky.Behavior.Blackboard.BehaviorEntityCollectionRange> ranges, int row, out BitQuirky.Behavior.Authoring.BehaviorDeclaredValueShape shape)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorEntityBlackboardCollectionStore.cs:257-269
Gets the preserved authored shape of one collection.
TryReadElement<T>(DynamicBuffer<BehaviorEntityCollectionRange> ranges, DynamicBuffer<BehaviorEntityCollectionByte> data, int row, int elementIndex, out T value)
Section titled “TryReadElement<T>(DynamicBuffer<BehaviorEntityCollectionRange> ranges, DynamicBuffer<BehaviorEntityCollectionByte> data, int row, int elementIndex, out T value)”public static bool TryReadElement<T>(Unity.Entities.DynamicBuffer<BitQuirky.Behavior.Blackboard.BehaviorEntityCollectionRange> ranges, Unity.Entities.DynamicBuffer<BitQuirky.Behavior.Blackboard.BehaviorEntityCollectionByte> data, int row, int elementIndex, out T value) where T : unmanagedSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorEntityBlackboardCollectionStore.cs:275-297
Reads one element by exact index. A row, index, or element width that does not match the stored collection reads nothing rather than reinterpreting neighbouring bytes.
TryRemoveLastElement(DynamicBuffer<BehaviorEntityCollectionRange> ranges, int row)
Section titled “TryRemoveLastElement(DynamicBuffer<BehaviorEntityCollectionRange> ranges, int row)”public static bool TryRemoveLastElement(Unity.Entities.DynamicBuffer<BitQuirky.Behavior.Blackboard.BehaviorEntityCollectionRange> ranges, int row)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorEntityBlackboardCollectionStore.cs:385-400
Drops the last element of one collection. The bytes stay reserved so a later append reuses them rather than relocating the collection again.
TryWriteElement<T>(DynamicBuffer<BehaviorEntityCollectionRange> ranges, DynamicBuffer<BehaviorEntityCollectionByte> data, int row, int elementIndex, T value)
Section titled “TryWriteElement<T>(DynamicBuffer<BehaviorEntityCollectionRange> ranges, DynamicBuffer<BehaviorEntityCollectionByte> data, int row, int elementIndex, T value)”public static bool TryWriteElement<T>(Unity.Entities.DynamicBuffer<BitQuirky.Behavior.Blackboard.BehaviorEntityCollectionRange> ranges, Unity.Entities.DynamicBuffer<BitQuirky.Behavior.Blackboard.BehaviorEntityCollectionByte> data, int row, int elementIndex, T value) where T : unmanagedSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorEntityBlackboardCollectionStore.cs:303-324
Writes one element by exact index inside this instance alone. The authored asset and every other instance are untouched.
BehaviorEntityCollectionByte
Section titled “BehaviorEntityCollectionByte”Category: Blackboards
struct BitQuirky.Behavior.Blackboard.BehaviorEntityCollectionByteSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorEntityBlackboardCollectionStore.cs:26-31
Implements: IBufferElementData
One byte of a graph instance’s own declared collection storage.
Responsibilities:
- Carry the elements of every declared list and array this instance owns, initialized from the artifact’s authored starting contents and never shared with another instance.
Does NOT:
- Address anything.BehaviorEntityCollectionRangeowns every offset, count, capacity, element width and preserved shape.
Members
Section titled “Members”public byte ValueSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorEntityBlackboardCollectionStore.cs:30
The raw storage byte.
BehaviorEntityCollectionRange
Section titled “BehaviorEntityCollectionRange”Category: Blackboards
struct BitQuirky.Behavior.Blackboard.BehaviorEntityCollectionRangeSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorEntityBlackboardCollectionStore.cs:45-62
Implements: IBufferElementData
The POD range metadata of one declared collection inside a graph instance’s own storage.
Responsibilities:
- State where this instance’s elements live, how many there are now, how many fit before the collection is relocated, how wide one element is, and which authored shape the variable was declared with.
Does NOT:
- Hold bytes, or point at the artifact. A range only ever addresses the instance’s own BehaviorEntityCollectionBytebuffer.
Members
Section titled “Members”ByteOffset
Section titled “ByteOffset”public int ByteOffsetSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorEntityBlackboardCollectionStore.cs:49
Byte offset of the first element inside this instance’s own storage.
Capacity
Section titled “Capacity”public int CapacitySource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorEntityBlackboardCollectionStore.cs:55
How many elements fit before the collection is relocated to grow.
ElementByteSize
Section titled “ElementByteSize”public int ElementByteSizeSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorEntityBlackboardCollectionStore.cs:58
Fixed byte width of one element.
ElementCount
Section titled “ElementCount”public int ElementCountSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorEntityBlackboardCollectionStore.cs:52
How many elements the collection holds right now.
public BitQuirky.Behavior.Authoring.BehaviorDeclaredValueShape ShapeSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorEntityBlackboardCollectionStore.cs:61
The authored shape, preserved from canonical source.
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 project asset or no value and never an untracked instance.
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.
BehaviorManagedReferenceSidecar
Section titled “BehaviorManagedReferenceSidecar”Category: Blackboards
class BitQuirky.Behavior.Blackboard.BehaviorManagedReferenceSidecarSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedReferenceSidecar.cs:18-79
Preallocated per-agent store for managed values of member reference slots.
Responsibilities:
- Hold one exact managed object per baked managed-reference sidecar index without per-write allocation, and track a monotonic per-slot version so the binding runtime can detect reference changes without boxing or byte comparison.
Does NOT:
- Read or write the native blackboard bytes, resolve targets, or own graph control flow.
Members
Section titled “Members”SlotCount
Section titled “SlotCount”public int SlotCount { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedReferenceSidecar.cs:37
Gets the number of preallocated reference slots.
BehaviorManagedReferenceSidecar(int slotCount)
Section titled “BehaviorManagedReferenceSidecar(int slotCount)”public BehaviorManagedReferenceSidecar(int slotCount)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedReferenceSidecar.cs:24-34
Allocates a cleared sidecar sized for the exact number of reference slots.
Clear()
Section titled “Clear()”public void Clear()Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedReferenceSidecar.cs:71-78
Clears every reference slot and its version, used on reset and disposal.
Read(int slotIndex)
Section titled “Read(int slotIndex)”public object Read(int slotIndex)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedReferenceSidecar.cs:40-43
Reads the exact reference at the sidecar slot, or null when unset.
Version(int slotIndex)
Section titled “Version(int slotIndex)”public int Version(int slotIndex)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedReferenceSidecar.cs:46-49
Reads the current monotonic version of the sidecar slot.
Write(int slotIndex, object value)
Section titled “Write(int slotIndex, object value)”public bool Write(int slotIndex, object value)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/BehaviorManagedReferenceSidecar.cs:55-68
Writes the exact reference at the sidecar slot, bumping its version only when the exact assigned object changes.
Blackboard
Section titled “Blackboard”Category: Blackboards
readonly struct BitQuirky.Behavior.Blackboard.BlackboardSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:103-562
Per-follower native key-value store. Each entry corresponds to a row ofBlackboardLayout: an interned field-id, aBakedFieldTypeCode, an offset into the per-follower byte buffer, and an owning authority.
Responsibilities:
- Hold the Burst-friendly POD layout view (slots + authority table).
- Provide typed read/write helpers that operate directly on a
NativeArray'1sized by BlackboardByteSize. - Enforce per-tick read-set / write-set / authority discipline in editor and development builds (the contract from ); the enforcement check is exposed as a separate Burst-callable function so the tick job can call it once per access without paying for managed indirection.
Does NOT:
- Allocate the per-follower byte buffer: the runtime instance owns that allocation. The blackboard struct is a stateless cursor over the layout + bytes the caller passes in.
- Parse Mermaid or own the interned name tables: those live on the BakedBehaviorArtifact.
- Mutate consumer gameplay data directly: those mutations flow through External Service Adapters (Layer 3).
Members
Section titled “Members”ByteSize
Section titled “ByteSize”public int ByteSize { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:150-154
Total size of the blackboard’s value storage in bytes, as baked.
IsCreated
Section titled “IsCreated”public bool IsCreated { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:164-168
Whether a baked layout is attached and the blackboard can be read or written.
SlotCount
Section titled “SlotCount”public int SlotCount { get; }Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:157-161
Number of slots in the baked layout; zero when no layout is attached.
Blackboard(BakedBehaviorArtifact artifact)
Section titled “Blackboard(BakedBehaviorArtifact artifact)”public Blackboard(BitQuirky.Behavior.Baked.BakedBehaviorArtifact artifact)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:122-134
Project a baked artifact’s blackboard layout + authority table into the runtime view. The struct is cheap to copy; pass it by value into Burst jobs.
Blackboard(NativeArray<BakedBlackboardSlot> layout, NativeArray<BakedAuthorityEntry> authority, int byteSize)
Section titled “Blackboard(NativeArray<BakedBlackboardSlot> layout, NativeArray<BakedAuthorityEntry> authority, int byteSize)”public Blackboard(Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedBlackboardSlot> layout, Unity.Collections.NativeArray<BitQuirky.Behavior.Baked.BakedAuthorityEntry> authority, int byteSize)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:140-147
Direct-from-natives constructor for tests and Burst jobs that already hold the arrays without going through the artifact.
CheckRead(int fieldNameInternedIndex, BakedFieldTypeCode expectedType, NativeArray<int> readFieldIds, int readStart, int readCount)
Section titled “CheckRead(int fieldNameInternedIndex, BakedFieldTypeCode expectedType, NativeArray<int> readFieldIds, int readStart, int readCount)”public BitQuirky.Behavior.Blackboard.BlackboardAccessOutcome CheckRead(int fieldNameInternedIndex, BitQuirky.Behavior.Baked.BakedFieldTypeCode expectedType, Unity.Collections.NativeArray<int> readFieldIds, int readStart, int readCount)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:232-252
Check thatfieldNameInternedIndexis in the
node’s declared read set and that the typed access is well-formed.
Pure: returns the outcome without writing to bytes.
Read set is the slice
readFieldIds[readStart .. readStart+readCount]stamped
onto the baked node byBehaviorBaker.
CheckWrite(int fieldNameInternedIndex, BakedFieldTypeCode expectedType, BakedAuthorityContext writerAuthority, NativeArray<int> writeFieldIds, int writeStart, int writeCount)
Section titled “CheckWrite(int fieldNameInternedIndex, BakedFieldTypeCode expectedType, BakedAuthorityContext writerAuthority, NativeArray<int> writeFieldIds, int writeStart, int writeCount)”public BitQuirky.Behavior.Blackboard.BlackboardAccessOutcome CheckWrite(int fieldNameInternedIndex, BitQuirky.Behavior.Baked.BakedFieldTypeCode expectedType, BitQuirky.Behavior.Baked.BakedAuthorityContext writerAuthority, Unity.Collections.NativeArray<int> writeFieldIds, int writeStart, int writeCount)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:260-285
Check thatfieldNameInternedIndexis in the
node’s declared write set, that the typed access is well-formed,
and that the writer’s authority is permitted to write the slot
(per the slot’s owner-authority).
Clear(NativeArray<byte> bytes)
Section titled “Clear(NativeArray<byte> bytes)”public static void Clear(Unity.Collections.NativeArray<byte> bytes)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:472-479
Zero every byte of the per-follower buffer. Use after spawn / reset to guarantee deterministic initial state.
GetOwnerAuthority(int fieldNameInternedIndex)
Section titled “GetOwnerAuthority(int fieldNameInternedIndex)”public BitQuirky.Behavior.Baked.BakedAuthorityContext GetOwnerAuthority(int fieldNameInternedIndex)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:202-217
Look up the owner-authority for a field id. Returns Unknownfor unknown ids.
ReadInt32Unchecked(BakedBlackboardSlot slot, NativeArray<byte> bytes)
Section titled “ReadInt32Unchecked(BakedBlackboardSlot slot, NativeArray<byte> bytes)”public int ReadInt32Unchecked(BitQuirky.Behavior.Baked.BakedBlackboardSlot slot, Unity.Collections.NativeArray<byte> bytes)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:296-299
Read an Int32 from the slot. Caller must have already cleared CheckRead; in editor / dev builds prefer TryReadInt32which performs the check.
TryGetSlot(int fieldNameInternedIndex, out BakedBlackboardSlot slot)
Section titled “TryGetSlot(int fieldNameInternedIndex, out BakedBlackboardSlot slot)”public bool TryGetSlot(int fieldNameInternedIndex, out BitQuirky.Behavior.Baked.BakedBlackboardSlot slot)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:178-196
Find the slot for a given interned field name index. Returns
trueon hit. Burst-callable; no managed indirection.
TryReadBool(int fieldNameInternedIndex, NativeArray<int> readFieldIds, int readStart, int readCount, NativeArray<byte> bytes, out bool value, out BlackboardAccessOutcome outcome)
Section titled “TryReadBool(int fieldNameInternedIndex, NativeArray<int> readFieldIds, int readStart, int readCount, NativeArray<byte> bytes, out bool value, out BlackboardAccessOutcome outcome)”public bool TryReadBool(int fieldNameInternedIndex, Unity.Collections.NativeArray<int> readFieldIds, int readStart, int readCount, Unity.Collections.NativeArray<byte> bytes, out bool value, out BitQuirky.Behavior.Blackboard.BlackboardAccessOutcome outcome)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:432-446
Read a Bool field, true for any non-zero slot byte, after checking it against the
node’s read set and slot type. Returns false withvaluefalse and
the refusing outcome when the check fails.
TryReadFloat2(int fieldNameInternedIndex, NativeArray<int> readFieldIds, int readStart, int readCount, NativeArray<byte> bytes, out float2 value, out BlackboardAccessOutcome outcome)
Section titled “TryReadFloat2(int fieldNameInternedIndex, NativeArray<int> readFieldIds, int readStart, int readCount, NativeArray<byte> bytes, out float2 value, out BlackboardAccessOutcome outcome)”public bool TryReadFloat2(int fieldNameInternedIndex, Unity.Collections.NativeArray<int> readFieldIds, int readStart, int readCount, Unity.Collections.NativeArray<byte> bytes, out Unity.Mathematics.float2 value, out BitQuirky.Behavior.Blackboard.BlackboardAccessOutcome outcome)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:388-404
Read a Float2 field as two consecutive floats from the slot offset, after checking it
against the node’s read set and slot type. Returns false with
valuedefault and the refusing outcome when the check fails.
TryReadFloat32(int fieldNameInternedIndex, NativeArray<int> readFieldIds, int readStart, int readCount, NativeArray<byte> bytes, out float value, out BlackboardAccessOutcome outcome)
Section titled “TryReadFloat32(int fieldNameInternedIndex, NativeArray<int> readFieldIds, int readStart, int readCount, NativeArray<byte> bytes, out float value, out BlackboardAccessOutcome outcome)”public bool TryReadFloat32(int fieldNameInternedIndex, Unity.Collections.NativeArray<int> readFieldIds, int readStart, int readCount, Unity.Collections.NativeArray<byte> bytes, out float value, out BitQuirky.Behavior.Blackboard.BlackboardAccessOutcome outcome)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:347-361
Read a Float32 field after checking it against the node’s read set and slot type.
Returns false withvaluezero and the refusing outcome when the
check fails.
TryReadInt32(int fieldNameInternedIndex, NativeArray<int> readFieldIds, int readStart, int readCount, NativeArray<byte> bytes, out int value, out BlackboardAccessOutcome outcome)
Section titled “TryReadInt32(int fieldNameInternedIndex, NativeArray<int> readFieldIds, int readStart, int readCount, NativeArray<byte> bytes, out int value, out BlackboardAccessOutcome outcome)”public bool TryReadInt32(int fieldNameInternedIndex, Unity.Collections.NativeArray<int> readFieldIds, int readStart, int readCount, Unity.Collections.NativeArray<byte> bytes, out int value, out BitQuirky.Behavior.Blackboard.BlackboardAccessOutcome outcome)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:306-320
Read an Int32 field after checking it against the node’s read set and slot type.
Returns false withvaluezero and the refusing outcome when the
check fails.
TryWriteBool(int fieldNameInternedIndex, BakedAuthorityContext writerAuthority, NativeArray<int> writeFieldIds, int writeStart, int writeCount, NativeArray<byte> bytes, bool value, out BlackboardAccessOutcome outcome)
Section titled “TryWriteBool(int fieldNameInternedIndex, BakedAuthorityContext writerAuthority, NativeArray<int> writeFieldIds, int writeStart, int writeCount, NativeArray<byte> bytes, bool value, out BlackboardAccessOutcome outcome)”public bool TryWriteBool(int fieldNameInternedIndex, BitQuirky.Behavior.Baked.BakedAuthorityContext writerAuthority, Unity.Collections.NativeArray<int> writeFieldIds, int writeStart, int writeCount, Unity.Collections.NativeArray<byte> bytes, bool value, out BitQuirky.Behavior.Blackboard.BlackboardAccessOutcome outcome)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:453-466
Write a Bool field as one or zero in the slot byte, after checking it against the
node’s write set, the slot type, and the slot’s owner authority. Returns false and
leavesbytesuntouched when the check fails.
TryWriteFloat2(int fieldNameInternedIndex, BakedAuthorityContext writerAuthority, NativeArray<int> writeFieldIds, int writeStart, int writeCount, NativeArray<byte> bytes, float2 value, out BlackboardAccessOutcome outcome)
Section titled “TryWriteFloat2(int fieldNameInternedIndex, BakedAuthorityContext writerAuthority, NativeArray<int> writeFieldIds, int writeStart, int writeCount, NativeArray<byte> bytes, float2 value, out BlackboardAccessOutcome outcome)”public bool TryWriteFloat2(int fieldNameInternedIndex, BitQuirky.Behavior.Baked.BakedAuthorityContext writerAuthority, Unity.Collections.NativeArray<int> writeFieldIds, int writeStart, int writeCount, Unity.Collections.NativeArray<byte> bytes, Unity.Mathematics.float2 value, out BitQuirky.Behavior.Blackboard.BlackboardAccessOutcome outcome)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:411-425
Write a Float2 field as two consecutive floats at the slot offset, after checking it
against the node’s write set, the slot type, and the slot’s owner authority. Returns
false and leavesbytesuntouched when the check fails.
TryWriteFloat32(int fieldNameInternedIndex, BakedAuthorityContext writerAuthority, NativeArray<int> writeFieldIds, int writeStart, int writeCount, NativeArray<byte> bytes, float value, out BlackboardAccessOutcome outcome)
Section titled “TryWriteFloat32(int fieldNameInternedIndex, BakedAuthorityContext writerAuthority, NativeArray<int> writeFieldIds, int writeStart, int writeCount, NativeArray<byte> bytes, float value, out BlackboardAccessOutcome outcome)”public bool TryWriteFloat32(int fieldNameInternedIndex, BitQuirky.Behavior.Baked.BakedAuthorityContext writerAuthority, Unity.Collections.NativeArray<int> writeFieldIds, int writeStart, int writeCount, Unity.Collections.NativeArray<byte> bytes, float value, out BitQuirky.Behavior.Blackboard.BlackboardAccessOutcome outcome)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:368-381
Write a Float32 field after checking it against the node’s write set, the slot type,
and the slot’s owner authority. Returns false and leaves
bytesuntouched when the check fails.
TryWriteInt32(int fieldNameInternedIndex, BakedAuthorityContext writerAuthority, NativeArray<int> writeFieldIds, int writeStart, int writeCount, NativeArray<byte> bytes, int value, out BlackboardAccessOutcome outcome)
Section titled “TryWriteInt32(int fieldNameInternedIndex, BakedAuthorityContext writerAuthority, NativeArray<int> writeFieldIds, int writeStart, int writeCount, NativeArray<byte> bytes, int value, out BlackboardAccessOutcome outcome)”public bool TryWriteInt32(int fieldNameInternedIndex, BitQuirky.Behavior.Baked.BakedAuthorityContext writerAuthority, Unity.Collections.NativeArray<int> writeFieldIds, int writeStart, int writeCount, Unity.Collections.NativeArray<byte> bytes, int value, out BitQuirky.Behavior.Blackboard.BlackboardAccessOutcome outcome)Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:327-340
Write an Int32 field after checking it against the node’s write set, the slot type,
and the slot’s owner authority. Returns false and leaves
bytesuntouched when the check fails.
BlackboardAccessOutcome
Section titled “BlackboardAccessOutcome”Category: Blackboards
enum BitQuirky.Behavior.Blackboard.BlackboardAccessOutcomeSource declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:38-73
Underlying type: byte
Outcome of a blackboard read/write attempt. Returned from the Burst-callable check helpers; mapped back onto the per-follower last-result-code on the runtime instance when an enforcement check fails.
Members
Section titled “Members”Allowed
Section titled “Allowed”Allowed = 0Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:41
The access is permitted: the field exists and the node declared it.
AuthorityViolation
Section titled “AuthorityViolation”AuthorityViolation = 5Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:72
Slot’s owner-authority forbids the writer’s authority (e.g. a ClientPresentationnode tried to write aHostAuthoritativeslot).
ReadSetViolation
Section titled “ReadSetViolation”ReadSetViolation = 2Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:53
The reading node did not declare this field in its read set.
TypeMismatch
Section titled “TypeMismatch”TypeMismatch = 4Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:65
Type code recorded by the bake does not match the request type (e.g. caller asked forFloat32 against anInt32slot).
UnknownField
Section titled “UnknownField”UnknownField = 1Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:48
The field id is not present in the baked blackboard layout. Bake-time validation should have caught this; the runtime check surfaces the regression.
WriteSetViolation
Section titled “WriteSetViolation”WriteSetViolation = 3Source declaration: Packages/io.bitquirky.behavior/Runtime/Blackboard/Blackboard.cs:58
The writing node did not declare this field in its write set.
Source fingerprint: sha256:ad0983d00d773d882bc61865e18d8c5559e009d181e5891575cd7f262515b23e