Start a branch from an event

Event tasks start a branch when a Unity or Behavior Designer event occurs. They are useful when a response should begin immediately instead of being polled by the main Start branch.

Keep the response independent

Place an event at the top of its own branch and connect the response beneath it. Event branches can run independently of the Start branch, which makes them a natural fit for reactions, messages, collision callbacks, and explicit interruptions.

Use React to an Event for a complete example.

Respond to tree lifecycle changes

Use On Behavior Tree Stopping after a stop is requested but before the tree stops. Use On Behavior Tree Pausing after a pause is requested but before execution pauses, and On Behavior Tree Unpausing when a paused tree resumes. These event branches provide a final in-tree cleanup or notification opportunity; code that must run regardless of graph structure can subscribe to the corresponding behavior-tree lifecycle events instead.

Quick reference

Description-only tasks are collected here so you can compare them without opening hundreds of separate menu entries. Search this page with your browser, or use the Behavior Tasks selector in the editor to filter by task name and capability.

Task Description
On Behavior Tree Pausing Invoked after a behavior tree pause is requested and before the tree is paused.
On Behavior Tree Stopping Invoked after a behavior tree stop is requested and before the tree is stopped.
On Behavior Tree Unpausing Invoked when a paused behavior tree resumes execution.
On Collision Enter Invoked when the agent causes a collision.
On Collision Enter2 D Invoked when the agent causes a 2D collision.
On Collision Exit Invoked when the agent leaves a collision.
On Collision Exit2 D Invoked when the agent leaves a 2D collision.
On Interrupt EventNode that is invoked when an interrupt occurs.
On Received Event Invoked when the specified event is received.
On Trigger Enter Invoked when the agent enters a trigger.
On Trigger Enter2 D Invoked when the agent enters a 2D trigger.
On Trigger Exit Invoked when the agent exits a trigger.
On Trigger Exit2 D Invoked when the agent exits a 2D trigger.