The Unity Visual Scripting integration lets Start Script Graph raise a custom
event in a Script Graph and optionally wait for that graph to resume the
Behavior Tree.

Expose the integration nodes

  1. Install Unity’s Visual Scripting package.
  2. Import VisualScripting.unitypackage from the Behavior Designer Integrations
    folder or the Opsive downloads page.
  3. In Project Settings > Visual Scripting, add
    BehaviorDesignerExtensions to Type Options.
  4. Choose Regenerate Nodes.

Connect a Script Graph

  1. Add a Custom Event node to the Script Graph and give it a unique name.
  2. Add Start Script Graph to the Behavior Tree and enter the same event name.
  3. Enable waiting on the task when tree traversal must pause until the graph
    finishes.
  4. At the end of the Script Graph path, call Resume Behavior Tree from the
    Behavior Designer extensions and return the intended status.

When waiting is disabled, the task does not require a resume node and the graph
runs independently.

Troubleshooting

  • Behavior Designer nodes do not appear: add the extension type and
    regenerate the Visual Scripting node library after the integration compiles.
  • The graph does not start: make the Custom Event and task event names match
    exactly and confirm the graph is active on the target object.
  • The task remains Running: add Resume Behavior Tree to every graph exit
    that should finish the task.