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

Property and field

Move one value between a member and a graph variable, in the direction that matches who owns it.

A property or field binding carries one value between your component and a graph variable, and the Direction control decides which way.

The Dungeon Heist guard’s patrol speed lives in a FloatVariable the game already tunes. The graph wants to read it, and the designer wants to change it while watching the guard walk. Copy that number into the graph and you have two speeds that disagree the moment either side changes.

Guard2.bqbehavior binds it two-way instead: patrolSpeed reads FloatVariable.Value before the tick and writes it back when the graph changes it. One number, one owner, two readers.

  • read when your game owns the value and the graph consumes it. Guard2.bqbehavior reads LiveFocus into a variable; the Platformer gallery reads Players.Initialized into player_initialized and LevelRules.coinUnlockThreshold into coin_unlock_threshold.
  • write when the graph owns the value and your component acts on it. Horde’s EnemyBrain.bqbehavior writes MovementIntent.Mode so the movement system does the moving.
  • two-way when both sides legitimately change the same value. Horde’s AttackIntent.Ready is a two-way bool: the graph grants permission, the attack system clears it.
A property member node reading player readiness
Figure 1. A property read names both the member and the variable it fills.
A field member node bound to a plain field
Figure 2. A field binding uses the same controls. There is no accessor to choose and no index row.
The whole property rail with its direction control and the variable it fills
Figure 3. A property read in full: Direction on read, and the blackboard name it writes.
The whole field rail on a plain C# field
Figure 4. The same controls on a field. No accessor choice, no index row.
The expanded patrolSpeed binding row with its TWO-WAY chip and its contract line
Figure 5. A two-way binding in the Member bindings list. Expand the row and it states the runtime rule itself: two-way, last writer wins, reentrancy guard suppresses echo.
patrolSpeed is a two-way binding, so its Current row accepts a value while the game runs and the guard picks up the new patrol speed on the next tick.
patrolSpeed is a two-way binding, so its Current row accepts a value while the game runs and the guard picks up the new patrol speed on the next tick.

patrolSpeed retyped from 2.2 to 6 in Live, with the guard picking the new speed up on the next tick. The writable control sits on the surfaced member card’s Current row, which is where a two-way binding earns its keep.

  1. Add property or field from the picker, under ACTIONS.

  2. Finish Target. For a shared setting with no instance, choose Static and then the declaring Type.

  3. Pick the member with Member > Change. The disclosure’s Access row reads read, write, or read · write, which is what the declaration actually offers.

  4. In Binding, set Direction to read, write, or two-way.

  5. Choose the blackboard value on the other end. For two-way, the list only offers values of the exact same type.

Result

Success
The access completed. A read wrote the variable, a write reached the member.
Failure
The accessor refused the value, or the binding could not resolve its target for this evaluation.
Running
Nothing here waits. A property or field access finishes inside the evaluation that started it.

Direction

Direction Graph file token What happens
read to-blackboard The member is read and the converted value is written to the variable
write to-member The variable is read and the converted value is written to the member
two-way two-way Both, with one exact type on both sides

Timing. A direction that reads the member is sampled before the core tick, so every node in that tick sees the same value. A direction that writes the member pushes after the core tick, for the slots the graph changed. A read binding can also refresh from a notification, when you authored a C# event or UnityEvent that says the value moved; without one it polls once before each selected tick.

Two-way details. The later writer wins. A synchronous notification caused by the graph’s own push is acknowledged without echoing a second change, so a push does not chase its own tail. When one side is clearly the owner, a one-way direction says so and reads better six months later.

What the declaration allows. A getter-only property or a readonly field can only be read. A setter-only property can only be written. Init-only and constant fields are read-only. A private setter on a public property stays unavailable until that property itself carries [BehaviorMember], and a compiler-generated backing field is never admitted.

Static members. A static declaration is one value for the whole game, which is right for a rule such as an alert threshold and wrong for anything per agent.

When it goes wrong

SymptomCheckFix
Two-way is refused.Compare the two types exactly.Make them identical. A one-way widening conversion is not enough for the return leg.
The variable lags one tick behind the game.A read direction samples before each selected tick.Confirm the agent update mode, or author a notification event so the read refreshes when the value moves.
The write never reaches your component.Read the Access row: the declaration may have no setter.Add a setter, or bind a method that performs the change.
Your component keeps overwriting the graph value.Both sides are writing the same member.Pick one owner and use a one-way direction toward the other side.
Every agent shares the value.Target mode is Static.Bind an instance target for a per-agent value.
A Vector2 member refuses a float2 variable.Struct types need exact identity; same size is not the same type.Declare the exact type the member uses.
  • Live editing: type into a two-way value while the game runs.
  • Conversion: exactly which type pairs are accepted.
  • Dungeon Heist: the guard whose patrol speed this page keeps using.
Full-size image