The main requirement for this book is having Unity Version 2018.2 or higher installed. In Chapter 9, Behavior Trees, we download Behavior Bricks, a free Behavior Tree plugin, which requires an account with the Unity Store. In Chapter 10, Machine Learning, we will use Unity's Machine Learning for Agents Toolkit, an official machine learning platform based on TensorFlow. For this reason, that chapter requires Python 3.6 to be installed.
To get the most out of this book
Download the example code files
You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packt.com/support and register to have the files emailed directly to you.
You can download the code files by following these steps:
- Log in or register at www.packt.com.
- Select the SUPPORT tab.
- Click on Code Downloads & Errata.
- Enter the name of the book in the Search box and follow the onscreen instructions.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
- WinRAR/7-Zip for Windows
- Zipeg/iZip/UnRarX for Mac
- 7-Zip/PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Unity-Artificial-Intelligence-Programming-Fourth-Edition. In case there's an update to the code, it will be updated on the existing GitHub repository.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Download the color images
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://www.packtpub.com/sites/default/files/downloads/9781789533910_ColorImages.pdf.
Conventions used
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "The AdvanceFSM class basically manages all the FSMState(s) implemented, and keeps updated with the transitions and the current state."
A block of code is set as follows:
int throwDiceLoaded() { Debug.Log("Throwing dice..."); int randomProbability = Random.Range(1,101); int diceResult = 0; if (randomProbability < 36) { diceResult = 6; } else { diceResult = Random.Range(1,5); } Debug.Log("Result: " + diceResult); return diceResult; }
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Our Tank object is basically a simple Mesh with a Rigidbody component."