- Be sure to download all the sample code for this book! Following along with the examples is crucial to understanding all the concepts covered.
- Brush up on your C# if you're rusty. This book will do its best to not leave anyone behind, but a beginner to intermediate level of understanding of C# and Unity scripting is assumed.
- Experiment! This book covers the core concepts, but all the examples are set up for experimentation. The reader is encouraged to build upon the given examples, to tweak values, assets, and code to achieve new outcomes.
- Be patient. Depending on your skill level or experience, you may find some of these concepts a bit daunting. Be sure to follow the instructions closely, and examine all the provided sample code thoroughly. AI can be a daunting subject, and while this book aims to make you feel comfortable with the core concepts, it's OK if you need to read an example more than once to fully understand all the nuances.
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.packtpub.com. If you purchased this book elsewhere, you can visit www.packtpub.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.packtpub.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-2017-Game-AI-Programming-Third-Edition. 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: http://www.packtpub.com/sites/default/files/downloads/Unity2017GameAIProgrammingThirdEdition_ColorImages.pdf.
Code in Action
Visit the following link to check out videos of the code being run:
https://goo.gl/rWXbwZ
Conventions used
There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "In fact, behaviors derive from ScriptableObject, not MonoBehaviour, so they exist only as assets."
A block of code is set as follows:
private int currentTarget; private float distanceFromTarget; private Transform[] waypoints = null;
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "As you can see in the previous screenshot, we have Show Grid set to true."