There's more...

By working on top of Unity's animation state machine, we gain a lot of flexibility. This way, we can reuse behaviors and decision making among several agents with minimum code and setup; however, what we gain in flexibility and modularity, we lose in script centralization. It is important to take that into account when working in teams, and even to remember that for debugging purposes (it happened while writing this book, LOL).

Get Unity 2018 Artificial Intelligence Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.