Skip to content
Bit Quirky Behavior Trees and
State Machines

Search documentation

All topics and APIs

Close returns focus to Search.

What are you looking for?

Try a common topic or enter a complete API identifier.

Browse the reference instead

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

v0.6.0
Menu

Member nodes and bindings

The six member nodes, their right-rail cards, their result rules, and the guide that teaches each one.

Six nodes connect a graph to your C#. Each entry here gives the result rule, the cards on the right rail, and the guide that shows the node doing its job.

Every member node records a complete identity: the declaring type, the member kind and name, the overload’s parameter types and modifiers, the generic arguments, the return or value type, the target, the arguments, the destinations, and the result policy. Nothing is searched for again while the game runs. A renamed member, a changed overload, a reordered parameter, or an invalid generic closure goes stale and says so, keeping your choices for a deliberate repair.

Results across the whole set: Success, Failure, and Running do the everyday work; Blocked, Interrupted, Timeout, and Authority mismatch are selectable outcomes that travel up so the reason survives; a Faulted result is a runtime fault, never an authored failure.

The first card on every member node. Mode decides the resolution rule, and the rest of the card asks for what that mode needs.

Runtime path Mode Rows on the card Resolves to
GameObject Agent Resolve (Self, Children, Parent), a Child path when Children is chosen, then Component The component on the agent’s own GameObject, on transform.parent, or on the first object at that exact child path
GameObject Reference Target Type, then Object, with Owner above it when several scene agents run the graph The object filling the named slot: passed by the host through BehaviorAgent.MemberReferences, stored on the graph as a project asset, or stored on one scene owner
GameObject Static Type The static declaration, with no instance
GameObject Variable Variable, then Target Type, which fills from the variable’s declared type The object the variable holds at that evaluation
Entity Self Component The component on the entity this graph instance runs on
Entity Handle Read from (Blackboard or Field on self), the entry, then Component The component on the one entity that entry names; one hop, never a chain
Entity Singleton Component, with an In the world row once it resolves The single entity carrying that component; zero or several fails the evaluation
Entity Static Type The static declaration, with no entity

Agent resolution is local: Self is the agent’s GameObject, Parent is its transform’s parent, Children is the first match on the path you typed. On the host, the component whose runtime type matches exactly wins, otherwise a single assignable component is accepted; a missing host, an absent component, and two equally good candidates are each reported. A Static target is one CLR declaration shared by every agent. A Variable target is read before each affected evaluation, and replacing the object releases work owned by the old one. Changing Mode clears everything the previous mode owned, from the type through the arguments and result, as one undoable edit.

Guide: targets and resolve, with one card per mode from the sample games and the DocumentationTargetModes.bqbehavior fixture.

The Member card shows a Name row and a Change button that opens the picker for the chosen target type. An indexer’s name row reads this. The disclosure adds read-only Kind, Signature, and Returns rows, plus Access for a property, field, or enabled state, spelled read, write, or read · write.

Public declarations are listed. A non-public one appears when that exact declaration carries [BehaviorMember], or overrides a declaration that does; a public property with a private setter needs that opt-in before the setter is usable, and a compiler-generated backing field is never admitted. Property accessors are not listed as methods, and members inherited from object or UnityEngine.Object are hidden unless the browsed type declares them.

The selected declaration then drives the rest of the rail:

Card Appears for Contents
Generic types A generic method One slot per type parameter, each closed with an explicit concrete type. Arguments, Outputs, Binding, Comparison, and Result stay locked until every slot closes.
Arguments Ordinary, in, and index parameters, and a trailing params One row per parameter with sources Default, Constant, Blackboard, and Project. Default appears only for a real compile-time default, tagged optional = with the declared value. A params row offers Individual values or Collection.
Read-write parameters Each ref parameter, on either runtime path A Read source and a required Write to destination. A Blackboard read writes back to itself, marked Same variable, until Use different destination separates it; a Constant read needs its destination chosen.
Outputs Each out parameter A required writable destination and no input source.
Binding Property and field Direction as read, write, or two-way, then the blackboard value.
Comparison Member condition Operator, a Constant or Blackboard operand, then When true and When false. On a void method with ref parameters, a Tested value row first: which ref parameter’s value after the call stands in for the void return. A method with one ref parameter records it when chosen; with several, the row stays Required until you choose.
Subscription Event condition, GameObject path Source reads c# event, with the contract stated: subscribes only while active, responds once.
Result Method, and every node that reports a mapped outcome Test, Always, and Returned where the return is the product’s own node result, plus an independent Store.

A CancellationToken parameter is supplied by the runtime and has no source control. Index arguments take exact types with no conversion; ordinary arguments use the accepted conversion set.

Result vocabulary. The pickers offer seven outcomes: succeeded, failed, running, interrupted, blocked, timeout, authority. Test compares with <, ≤, =, ≠, ≥, > for values and is or is not for references. A contract whose every outcome is running is refused. For a coroutine or awaitable result, While waiting is locked to running, On interrupt is locked to interrupted, On fault is authored, and Give up after is Off or On with a finite number of seconds and the result to report.

Guides: arguments and results, waiting and cancellation.

Invoke one exact method and decide what its return means. Graph token member_method. Picker line: “invoke a c# method on a target”.

A method member node calling the player rules
Figure 1. A method member node calling the player rules

Result

Success
The mapped outcome for this return is succeeded, or a deferred call completed as succeeded.
Failure
The mapped outcome is failed, or a deferred call completed as failed, or the give-up result is failed.
Running
An outcome maps to running so the node calls again next evaluation, or a coroutine or awaitable is outstanding.
Field What to enter Effect
Member The exact overload. Records the whole signature, including parameter modifiers.
Arguments, Read-write parameters, Outputs A source per parameter and a destination per ref and out. ref inputs are captured before the call; outputs commit in declaration order after a normal return, before result mapping.
Result > Node result Test, Always, or Returned. Turns the return value into a node result.
Store A compatible destination, or nothing stored. Independent of the result. A return can be both stored and tested.
Deferred rows On fault, Give up after, and its result. Only for a coroutine or awaitable return.

One activation owns one invocation: the method is not called again while its coroutine or awaitable is outstanding, and a late completion cannot resume a later activation. A thrown call reports a fault, commits no outputs, and records the graph, node, and member. On the entity path a method needs a static declaring type.

Use it when the answer changes what happens next, as in Racing Line’s CpuRace.bqbehavior (sample). Guide: method.

Read, write, or synchronize one exact property. Graph token member_property. Picker line: “read or write a property”.

A property member node reading player readiness
Figure 2. A property member node reading player readiness

Result

Success
The access completed: a read wrote the variable, a write reached the member.
Failure
The accessor refused the value, or the target did not resolve for this evaluation.
Running
Nothing waits. The access finishes inside the evaluation that started it.
Field What to enter Effect
Binding > Direction read, write, or two-way. Graph tokens to-blackboard, to-member, two-way.
Binding > blackboard value A compatible variable. The other end of the move. Two-way offers only exactly matching types.
Arguments Index values, for an indexed property. Exact types only, re-read each evaluation for a Blackboard index.

A read direction samples before the core tick, or refreshes from an authored notification event. A write direction pushes after the core tick for the slots the graph changed. Two-way takes the later writer and acknowledges its own push without echoing. The declaration decides what is possible: a getter-only property reads, a setter-only property writes.

Use it when your component owns the value and the graph consumes it, as in Dungeon Heist’s Guard2.bqbehavior two-way patrolSpeed (sample). Guide: property and field.

Read, write, or synchronize one exact field. Graph token member_field. Picker line: “read or write a field”.

A field member node bound to a plain field
Figure 3. A field member node bound to a plain field

Result

Success
The access completed in the direction you authored.
Failure
The write was refused, or the target did not resolve for this evaluation.
Running
Nothing waits here.
Field What to enter Effect
Binding > Direction read, write, or two-way. Same three tokens as a property.
Binding > blackboard value A compatible variable. There is no accessor choice and no index row.

A readonly, init-only, or constant field can only be read. On the entity path a field is the workhorse: a component field, a static field, an enabled state, or one addressed buffer entry field.

Use it when the data is a plain field, as in Horde Survival’s two-way AttackIntent.Ready (sample). Guide: property and field.

Fire one exact void call and continue. Graph token member_message. Picker line: “send a message; fire and forget”.

A message member node requesting a slam
Figure 4. A message member node requesting a slam

Result

Success
The call was made and accepted.
Failure
The call threw or the target was missing, reported as a fault rather than an authored failure.
Running
Nothing waits. The void call settles in the evaluation that made it.
Field What to enter Effect
Member An exact public void method. A returning method is refused, with the picker saying a message needs a void-returning method.
Arguments, Read-write parameters, Outputs Whatever the declaration exposes. Same authoring as a method.
Result Node result on Always, with Reports naming one of the seven outcomes. Test is inert: a void return has nothing to compare, nothing to store, and no completion to wait for. A void method that writes outputs states that contract in place of the control.

On the entity path a message needs a static declaring type, since an entity component has no instance call site.

Use it for a one-shot command, as in the Platformer beacon’s Shine() (tutorial). Guide: message.

Turn one member value into a branch decision. Graph token member_condition. Picker line: “gate on a member comparison”.

A member condition checking player readiness
Figure 5. A member condition checking player readiness

Result

Success
The comparison mapped to succeeded.
Failure
The comparison mapped to failed.
Running
An outcome maps to running, so the member is read or invoked again on the next evaluation.
Field What to enter Effect
Comparison > Operator <, ≤, =, ≠, ≥, > for values; is, is not for references. The test applied to the member value.
Comparison > operand Constant or Blackboard, typed to the member. What the value is compared against.
When true / When false Any of the seven outcomes. Both branches are explicit. A contract whose every outcome is running is refused.
Arguments For a method-backed condition. The method invokes once per evaluation, including with outputs, and maps the value it returned.

A struct compares with its own == when it declares one, otherwise through the default comparer. A member condition observes for Lower Priority when the Selector above it is set to Lower priority; Self belongs to the Conditional decorator. An invocation or target failure is a fault, not a false comparison.

Use it as a gate on real component state, as in Dungeon Heist’s guard checks (sample). Guide: condition and event.

Wait for one firing from an exact event source. Graph token member_event. Picker line: “wait for one firing of an event”.

An event condition waiting for the slam wind up
Figure 6. An event condition waiting for the slam wind up

Result

Success
The event fired and the outcome it reports is succeeded, which is what a GameObject binding always reports.
Failure
The entity form's **When it fires** chose failed, or the wait was ended by a give-up result of failed.
Running
The node is subscribed and the event has not fired.
Field What to enter Effect
Member The exact event. Public events are listed; a static event is reached through a Static target.
Subscription > Source c# event. The card states the contract: subscribes only while active, responds once.
Entity Observation > Source Enabled state or Event buffer, with the component or the watched entry. The entity form; its result card offers When it fires with Until then locked to running.

The subscription belongs to one activation, stamped with a generation. Completion, interruption, timeout, reset, target loss, and leaving a state all remove it, and a firing recorded against an older generation cannot complete a later activation. Firings are drained before the core tick. An event nobody raises waits indefinitely, so bound it with Time Limit when the game cannot promise it. The entity form observes an enableable state or a retained buffer entry and rearms only after a tick sees the opposite state or the entry absent.

Use it when your component owns the timing, as in the Platformer beacon’s wind up (tutorial). Guide: condition and event.

Node Settles immediately Can hold Running Owns cancellable work
Method Yes, for an ordinary return Yes, for a coroutine or awaitable While the call is outstanding
Property Yes No No
Field Yes No No
Message Yes No No
Member condition Yes Yes, when an outcome maps to running and polls No
Event condition No Yes, while subscribed Yes, the subscription

A missing target, a stale declaration, a thrown call, a give-up, and an authored false comparison each have their own policy, so read the one you got before you change the node.

Full-size image