Preface

Welcome to Mobile Game Development with Unity! In this book, we’ll take you from nothing all the way up to building two complete games, and teach you both beginning and advanced Unity concepts and techniques along the way.

The book is split into four parts.

Part I introduces the Unity game engine, and explores the basics, including how to structure games, graphics, scripting, sounds, physics, and particle systems. Part II then takes you through the construction of a full 2D game with Unity, involving a gnome on a rope trying to get treasure. Part III explores the construction of a full 3D game with Unity, including spaceships, asteroids, and more. Part IV explores some of the more advanced features of Unity, including lighting, the GUI system, extending the Unity editor itself, the Unity asset store, deploying games, and platform-specific features.

If you have any feedback, please let us know! You can email us at unitybook@secretlab.com.au.

Resources Used in This Book

Supplemental material (art, sound, code examples, exercises, errata, etc.) is available for download at http://secretlab.com.au/books/unity.

Audience and Approach

This book is designed for people who want to build games but don’t have any previous game development experience.

Unity supports a few different programming languages. We’ll be using C# in this book. We will assume that you know how to program in a relatively modern language, but it doesn’t have to be recent programming experience as long as you’re somewhat comfortable with the basics.

The Unity editor runs on both macOS and Windows. We use macOS, so the screenshots shown throughout the book are taken from there, but everything we cover is identical on Windows, with one small exception: building iOS games with Unity. We’ll explain when we get to it, but you can’t do it on Windows. Android works fine on Windows though, and macOS can build for both iOS and Android.

The book takes the approach that you need to understand the basics of game design, as well as Unity itself, before you build some games, so we teach you that in Part I. Once that’s done, parts II and III explore the construction of a 2D game and a 3D game, respectively, and then in Part IV we follow up with all the other Unity features that you should know about.

We will assume that you’re fairly confident and comfortable navigating your operating system, and using your mobile devices (whether they be iOS or Android).

We won’t be covering the creation of art or sound assets for your games, although we do supply assets for the two games you build through this book.

Conventions Used in This Book

The following typographical conventions are used in this book:

Italic

Indicates new terms, URLs, email addresses, filenames, and file extensions.

Constant width

Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.

Constant width bold

Shows commands or other text that should be typed literally by the user.

Constant width italic

Shows text that should be replaced with user-supplied values or by values determined by context.

Tip

This icon signifies a tip or suggestion.

Note

This element signifies a general note.

Warning

This icon indicates a warning or caution.

Using Code Examples

Supplemental material (code examples, exercises, errata, etc.) is available for download at http://secretlab.com.au/books/unity.

This book is here to help you get your job done. In general, if example code is offered with this book, you may use it in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.

We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “Mobile Game Development with Unity by Jonathon Manning and Paris Buttfield-Addison (O’Reilly). Copyright 2017 Secret Lab, 978-1-491-94474-5.”

If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at .

O’Reilly Safari

Note

Safari (formerly Safari Books Online) is a membership-based training and reference platform for enterprise, government, educators, and individuals.

Members have access to thousands of books, training videos, Learning Paths, interactive tutorials, and curated playlists from over 250 publishers, including O’Reilly Media, Harvard Business Review, Prentice Hall Professional, Addison-Wesley Professional, Microsoft Press, Sams, Que, Peachpit Press, Adobe, Focal Press, Cisco Press, John Wiley & Sons, Syngress, Morgan Kaufmann, IBM Redbooks, Packt, Adobe Press, FT Press, Apress, Manning, New Riders, McGraw-Hill, Jones & Bartlett, and Course Technology, among others.

For more information, please visit http://oreilly.com/safari.

How to Contact Us

Please address comments and questions concerning this book to the publisher:

  • O’Reilly Media, Inc.
  • 1005 Gravenstein Highway North
  • Sebastopol, CA 95472
  • 800-998-9938 (in the United States or Canada)
  • 707-829-0515 (international or local)
  • 707-829-0104 (fax)

We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at http://bit.ly/Mobile-Game-Dev-Unity.

To comment or ask technical questions about this book, send email to .

For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.

Find us on Facebook: http://facebook.com/oreilly

Follow us on Twitter: http://twitter.com/oreillymedia

Watch us on YouTube: http://www.youtube.com/oreillymedia

Acknowledgments

Jon and Paris wish to thank their fabulous editors, especially Brian MacDonald (@bmac_editor) and Rachel Roumeliotis (@rroumeliotis) for their work in bringing this book to fruition. Thanks for all the enthusiasm! Thanks also to the fabulous staff at O’Reilly Media, for making writing books such a pleasure.

Thanks also to our families for encouraging our game development, as well as all of MacLab and OSCON (you know who you are) for encouragement and enthusiasm. Thanks particularly to our fabulous tech reviewer, Dr. Tim Nugent (@the_mcjones).

Get Mobile Game Development with Unity 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.