The scene setup

There are quite a few things going on in this scene, as this example is a bit more complex than previous ones in this book. We'll touch on each element, but will keep our focus on the topic at hand: behavior trees. Let's take a look at the scene hierarchy, which looks like the following screenshot:

The scene hierarchy

In the hierarchy depicted in this screenshot, we'll find a few game-related elements, and you may also notice that the canvas has quite a few elements nested under it.

The Game game object has two components on it—the Animator, which controls the game states, and the Game.cs component, which controls the game ...

Get Unity 2017 Game AI Programming - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.