Visual Scripting

Behavior Designer integrates directly with Unity’s Visual Scripting package by allowing Visual Scripting to carry out the action tasks and then resume the behavior tree from where it left off. The Visual Scripting integration files are located on the downloads page.

To get started ensure you have first added the BehaviorDesignerExtensions type to the Visual Scripting Type Options. This menu option can be found within the Unity Project Settings dialogue. Be sure to select Regenerate Nodes after you have added the type.

After the type has been added your Script Graph can communicate with your behavior tree. Your behavior tree should contain the Start Script Graph task with the name of the event that you want to start with your Script Graph. This event name should be the same as the string within a new Custom Event node from your Script Graph.

After your Custom Event has executed you can perform any operations within your Script Graph. In the sample Script Graph the Add node is used to add a constant to the synchronized variable. After all of your operations have been performed you can sync with the behavior tree by using the Resume Behavior Tree node from Behavior Designer Extensions object.

If within the Start Script Graph task you are not waiting on the Behavior Tree to complete then you do not need to add the Resume Behavior Tree node.