Chapter 7. Artificial Intelligence

This chapter takes a highly practical and specialized focus. Here, we'll cover the development of a single Unity project from start to finish in creating a maze scene that features enemy characters with Artificial Intelligence (AI); these characters have the ability to search for and chase us, attack us, and also flee from us while looking for health-restore potions. The following screenshot shows the maze scene in Unity:

Artificial Intelligence

The maze scene

Tip

The AI project for this book can be found in the book's companion files (code bundle) in the ai folder of this chapter.

In creating this project, we'll apply nearly all the concepts ...

Get Mastering Unity Scripting 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.