Behavior Designer
Table of Contents
Behavior Designer 2 ..............................................................................................................
Overview 3 ...............................................................................................................................
What is a Behavior Tree? 7 ...................................................................................................
Behavior Trees or Finite State Machines 9 ........................................................................
Installation 10 .........................................................................................................................
Behavior Tree Component 10 ...............................................................................................
Create a Behavior Tree from Script 12 ...............................................................................
Behavior Manager 13 .............................................................................................................
Tasks 14 ...................................................................................................................................
Parent Tasks 15 ......................................................................................................................
Writing a New Conditional Task 16 .....................................................................................
Writing a New Action Task 19 ..............................................................................................
Debugging 22 ..........................................................................................................................
Variables 24 .............................................................................................................................
Dynamic Variables 27 ............................................................................................................
Global Variables 27 ................................................................................................................
Creating Shared Variables 28 ...............................................................................................
Accessing Variables from non-Task Objects 28 .................................................................
Conditional Aborts 29 ............................................................................................................
Events 32 .................................................................................................................................
External Behavior Trees 33 ...................................................................................................
Networking 35 .........................................................................................................................
Referencing Tasks 36 .............................................................................................................
Object Drawers 38 ..................................................................................................................
Variable Synchronizer 40 ......................................................................................................
Syncing Animations 42 ..........................................................................................................
Referencing Scene Objects 43 ..............................................................................................
Task Attributes 44 ..................................................................................................................
Integrations 46 .......................................................................................................................
Dialogue System 47 ...............................................................................................................
Opsive Character Controllers 49 ..........................................................................................
Playmaker 60 ..........................................................................................................................
uScript 65 ................................................................................................................................
Videos 68 .................................................................................................................................
| 3
Behavior Designer
| 4
Overview
Behavior Designer is a behavior tree implementation designed for everyone – programmers,
artists, designers. Behavior Designer offers a powerful API allowing you to easily create new
tasks. it offers an intuitive visual editor with extensive third party integration making it
possible to create complex AIs without having to write a single line of code.
This guide is going to give a general overview of all aspects of Behavior Designer. If you’re
just getting started with behavior trees we have a “Behavior Tree Basics” video series. This
page also has a quick overview of behavior trees. With Behavior Designer you don’t need to
know the underlying behavior tree implementation but is a good idea to know some of the
key concepts such as the types of tasks (action, composite, conditional and decorator).
When you first open Behavior Designer you’ll see the following window:
There are four sections within Behavior Designer. From the screenshot below, section 1 is
the graph area. It is where you’ll be creating the behavior trees. Section 2 is a properties
panel. The properties panel is where you’ll be editing the specific properties of a behavior
tree, adding new tasks, creating new variables, or editing the parameters of a task. Section
3 is the behavior tree operations toolbar. You can use the drop down boxes to select existing
behavior trees or add/remove behavior trees. The final section, section 4, is the debug
toolbar. You can start/stop, step, and pause Unity within this panel. In addition, you’ll see
the number of errors that your tree has even before you start executing your tree.
| 5
Section 1 is the main part of Behavior Designer that you’ll be working in. Within this section
you can create new tasks and arrange those tasks into a behavior tree. To start things off,
you first need to add a Behavior Tree component. The Behavior Tree component will act as
the manager of the behavior tree that you are just starting to create. You can create a new
Behavior Tree component by right clicking within the graph area and clicking “Add
Behavior Tree” or by clicking on the plus button next to “Lock” within the operations area of
section 3.
Once a Behavior Tree has been added you can start adding tasks. Add a task by right
clicking within the graph area or clicking on the “Tasks” tab within section 2, the properties
panel. New tasks can also be added by pressing the space bar and opening the quick task
search window:
Once a task has been added you’ll see the following: