PlayMaker 2
Use the PlayMaker 2 integration when a behavior tree should start, stop, signal, or wait for a PlayMaker 2 FSM, or when an FSM should control a Behavior Designer Pro tree.
Install and use the integration
- Install Behavior Designer Pro with its dependencies.
- Install PlayMaker 2, including its
com.hutonggames.playmakerpackage. Download the PlayMaker 2 integration from Opsive Downloads and import it intoAssets/Opsive/BehaviorDesigner/Integrations/PlayMaker2. Its assembly enables when the PlayMaker 2 package is installed. - Wait for Unity to finish importing and compiling, then search for PlayMaker2 in the Task List. Confirm Start FSM appears. PlayMaker actions are in the Behavior Designer Pro category.
The integration provides:
- Behavior Designer Pro tasks: Start FSM, Stop FSM, Resume FSM, Run Conditional FSM, Send Event, Broadcast Event, Synchronize Variable, and Synchronize Variables.
- PlayMaker 2 actions: Start Behavior Tree, Stop Behavior Tree, Resume Behavior Tree, Send Event, Synchronize Variable, and Synchronize Variables.
To try the integration:
- Add a Behavior Tree and a PlayMaker 2 FSM component to the same GameObject. Name the FSM FSM.
- In PlayMaker, create an idle state that waits for an event named StartFSM, then transitions to a work state. At the end of the work state, add Behavior Designer Pro / Resume Behavior Tree, set Success to true, and return to idle.
- In Behavior Designer Pro, connect Start to Sequence, then add Start FSM followed by Log. On Start FSM, set FSM Name to FSM, Start Event Name to StartFSM, and enable Wait For FSM Completion.

- Enter Play Mode. The Log task runs after PlayMaker’s Resume Behavior Tree action reports completion. Setting the action’s Success to false makes Start FSM fail.
- Enable variable synchronization only for values needed by both graphs. If the FSM needs to react when its tree is paused or stopped, configure the task’s optional Pause Event Name, Resume Event Name, and End Event Name, and handle those events in the FSM.
Use an exact FSM Name when an object has multiple FSM components. An empty name selects the first FSM; an unknown nonempty name fails to resolve. FSM template components are also supported.
Let an FSM wait for a behavior tree
- Disable the tree’s Start When Enabled option.
- In PlayMaker, add Start Behavior Tree, select the target object and tree Index, enable Wait For Completion, and bind Store Success.
- End the relevant tree branch with Resume FSM. Set its Success field to the result that PlayMaker should receive.

PlayMaker waits until Resume FSM executes. Stopping the tree alone does not send this completion signal. Stop Behavior Tree with Pause enabled pauses the tree; Start Behavior Tree resumes it. Leaving the waiting FSM state releases its listener.
Use the exact tree Index on objects with multiple behavior trees. An unknown index never selects a different tree.
Variables and events
Synchronize Variable copies one value between a Shared Variable and a local FSM variable or a referenced Global Variable asset. The PlayMaker action selects its Shared Variable by exact name and Graph or Project scope.
Synchronize Variables pairs matching local variable names, including group paths, with Graph-scoped Shared Variables. For global synchronization, it pairs loaded PlayMaker Global Variable assets with Project-scoped Shared Variables. Unmatched declarations are skipped; matching declarations with incompatible types fail and are logged.
Reference global assets from an FSM or another included asset so they are loaded and included in player builds. Bulk synchronization does not load every global asset in the project. PlayMaker-to-tree writes update the tree through its public setter, including its ECS variable storage.
Send Event targets one FSM by local event name. Broadcast Event requires a PlayMaker 2 Global Event asset. Completion signals target the exact FSM or behavior tree component, and interrupted tasks and actions release their subscriptions.
Run Conditional FSM requires an active FSM and a completion response during the event call. Use a synchronous FSM path without Wait, delayed transitions, or actions that finish on a later update. Without an immediate completion response, the condition returns Failure. Each conditional reevaluation sends the event again.
Related: