Global Variables

Global variables are similar to local variables except any behavior tree can access an instance of the same variable. To access global variables, navigate to the Window->Behavior Designer->Global Variables menu option or from within the Variables pane:

When a global variable is first added an asset file is created which stores all of the global variables. This file is created at /Behavior Designer/Resources/BehaviorDesignerGlobalVariables.asset. You can move this file as long as it is still located in a Resources folder.

Global variables are assigned in a very similar way as local variables. In the task inspector, when you are assigning a global variable the global variables are located under the “Globals” menu item:

Global variables can also be accessed from non-Task derived objects.