We have already created the whole setup, including actors, controllers, perception, and navigation. However, we don't have any code that makes this Behavior Tree run on our agent. Of course, we will cover both the Blueprint case and the C++ one.
Running the Behavior Tree
Running the Behavior Tree using the Blueprint controller
If we have a Blueprint controller set up, we can easily modify it to get the Behavior Tree running immediately.
In fact, once we open the Editor, we can add the Run Behavior Tree node after overriding the Event OnPossess and choose the right Behavior Tree, as shown in the following screenshot:
Save it, and you are good to go! Run the game and see if it works (of course, the AI controller needs...