Choose a task type

Tasks are the building blocks of a behavior tree. Choose the task category that matches the job, then combine tasks into a tree that communicates the agent’s decisions from top to bottom.

  • Actions do work, such as waiting, moving, sending an event, or changing a value.
  • Conditionals answer a question with success or failure.
  • Composites choose the order in which multiple children run.
  • Decorators change how one child runs or reports its result.
  • Events start a branch in response to something that happened.

Learn the editor workflows

Use Stacked Action for grouped commands, standalone Action choices, and component methods that perform work. Use Stacked Conditional for grouped questions, standalone Conditional choices, and component methods that return a boolean result.

Find and add a task

Press Space in the graph for the pointer-based selector, or open Tools > Opsive > Behavior Designer > Task Palette for a dockable browser. Search by task name or metadata, browse categories, and use Favorites for recurring entries. Recent keeps the last selected entries up to the limit in Preferences; a limit of 0 hides it. Documentation opens the entry’s documentation when its capability supplies a URL.

The selector’s Filter menu contains:

  • Kind > Built-in / Codebase for curated task types or tasks generated from project code;
  • Member > Methods / Get Properties / Set Properties;
  • Scope > Static / Instance;
  • Returns for a required return type;
  • Requires for an installed package or integration dependency; and
  • Clear Filters to remove every active constraint.

The number beside Filter is the active-filter count. A capability without the selected metadata is excluded, so an instance-member filter also hides curated task types. The dockable Task Palette requires an open Behavior Designer editor because it adds the selection to that window’s active graph.

Use task and group menus

Right-click one or more tasks or a group:

Command Result
Cut / Copy / Duplicate / Delete Applies the standard graph operation to the complete selection. Compatible internal connections are retained when copied.
Enable / Disable Includes or excludes the selected task from execution.
Collapse / Expand Hides or shows child content where the task supports it.
Set Color Adds an editor-only organizational color.
Replace Changes the task type and preserves compatible serialized fields. Review the Inspector because unsupported fields cannot transfer.
Edit Script / Locate Script Opens the task source or selects it in the Project window.
Connect To > event Connects a compatible task to an offered behavior-tree event.
Save as Subtree Extracts a valid selected branch using the workflow on Subtrees.

The node hover toolbar exposes Enable/Disable, Collapse/Expand, adding a connected task, and More. More provides Replace, Set Color, Edit Script, and Locate Script without opening the full context menu.

Use the Element Inspector

Selecting a task displays its serialized fields plus its custom name and comment. The gear menu provides Edit Script, Locate Script, and Reset; Reset restores task defaults and clears the custom name and comment. A field’s watch icon displays its live value on the node without changing runtime behavior.

Stacked task lists support Enable/Disable, drag reordering, + to add, and – to remove. Right-click a stacked row for Replace, Rename, Edit Script, Locate Script, Copy, Paste, Duplicate, or Delete. Copy, Duplicate, and Delete can use a multi-row selection; Replace and Rename require one row. Dragging a GameObject or Component onto a supported Inspector area opens a filtered selector and assigns that object to the new task. Serialized editing commands are disabled in Play Mode.

Build a complete behavior

For complete trees that solve familiar AI problems, browse Common Behaviors.