O'Reilly logo

Unity 4.x Game AI Programming by Thet Naing Swe, Aung Sithu Kyaw, Clifford Peters

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Interfacing with the script

Before we can access this behavior tree from a script we need to build or compile this behavior tree. Behave will compile the tree to a DLL so that we can reference and implement our own custom actions from our scripts. It is important to note that whenever we change anything inside the library, we will have to recompile the library before we try and use what we added. There are two options to build a Behave library either debug or release. These build options only apply to our Behave library and not to our actual game. We'll be using the debug build in this tutorial that will allow us to debug our behavior trees using Behave's built-in visual debugger.

So, to compile your behavior tree just select the Behave library ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required