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

Install

Add the package to a Unity 6.5 project, open the editor, create your first graph, and import the sample games.

Ten minutes from a project with no package to a graph open in the editor. Unity does most of the waiting.

Unity 6.5 or later, official releases only. The package manifest sets 6000.5 as the minimum, and alpha or beta builds are outside the supported set.

The package is io.bitquirky.behavior. It pulls in Bit Quirky Graph, Burst, Collections, Mathematics, and Entities, all of which Unity resolves for you. Addressables stays optional: the package uses it when it is present and works without it. The exact declared versions sit on the compatibility page.

  1. Open your project and let any current import finish. A quiet console makes the next steps easier to read.

  2. Add io.bitquirky.behavior through Window > Package Manager, or add it to the project manifest that your team already uses for Bit Quirky packages. If you received .unitypackage files instead, import the product package through Assets > Import Package > Custom Package.

  3. Wait for the import, then the generated code pass, then the C# compile. The package brings its own editor window and runtime, with validators that come online at the same time.

  4. Check Window > Behavior & State > Behavior Tree Editor exists in the menu.

Keep the package coherent through Package Manager or the manifest. Copying individual files into Assets/ separates the editor, the runtime, the Graph dependency, and the generated code that ship as one unit.

  1. In the Project window, choose Assets > Create > Behavior & State > Behavior Tree. For modes instead of a plan, choose State Machine in the same menu.

  2. Name the graph after the decision it owns, such as GuardAdvance. The file is a .bqbehavior graph file, and it is the thing you edit and ship.

  3. Double click it. The editor opens in Static mode, which is authoring mode.

  4. Click add root behavior on the empty canvas. The insertion picker opens, grouped by what each node does. Every node card has an insertion handle for adding children the same way.

  5. Add a node and select it, then read the right rail. Target, member, arguments and result all live there, and the validation strip at the foot of the canvas names anything still missing.

The Platformer patrol graph on the Static canvas: a repeat forever decorator above a Sequence, with a member condition and a bound method node beneath it.
Figure 1. The Platformer sample’s patrol graph in Static mode. Your first graph starts with one node and grows from the same canvas.

The right rail is where a node meets your code. Choosing a component type and then one exact member signature is the whole binding gesture.

The member picker open on a graph node, listing the members of the selected component type.
Figure 2. The member picker lists the members of the chosen component type, one entry per exact signature.

Your first behavior tree takes this to a moving object in your own scene.

The four games ship as their own imports, one per game, so a project takes only the sample it wants. Import a sample through Assets > Import Package > Custom Package, and its content lands under Assets/BitQuirky/BehaviorTreesAndStateMachines/Samples/.

Each game is playable and each one runs the graphs its chapter documents. Platformer is the one to open first: press Play, move with the arrow keys or A and D, jump with Space, and land on an enemy from above to stomp it. Then open EnemyPatrol.bqbehavior and read the graph that produced the walk you just watched.

The screenshots across this site come from those projects, where the sample folders sit at paths like Assets/Platformer/. The imported layout puts the same folders under the Samples/ path above.

Sample games has a chapter per game.

The package ships the C# for its runtime and editor, under Runtime/ and Editor/ inside the package folder. You can read it, debug into it, and set a breakpoint while you work.

Reading it grants no extra rights. LICENSE.md inside the package is the authority on use, copying, modification, and distribution, and it does not change because the code is visible.

Full-size image