Book Image

Unity 5.x Cookbook

Book Image

Unity 5.x Cookbook

Overview of this book

Unity 5 is a flexible and intuitive multiplatform game engine that is becoming the industry's de facto standard. Learn to craft your own 2D and 3D computer games by working through core concepts such as animation, audio, shaders, GUI, lights, cameras, and scripting to create your own games with one of the most important and popular engines in the industry. Completely re-written to cover the new features of Unity 5, this book is a great resource for all Unity game developers, from those who have recently started using Unity right up to game development experts. The first half of the book focuses on core concepts of 2D game design while the second half focuses on developing 3D game development skills. In the first half, you will discover the new GUI system, the new Audio Mixer, external files, and animating 2D characters in 2D game development. As you progress further, you will familiarize yourself with the new Standard Shaders, the Mecanim system, Cameras, and the new Lighting features to hone your skills towards building 3D games to perfection. Finally, you will learn non-player character control and explore Unity 5's extra features to enhance your 3D game development skills.
Table of Contents (20 chapters)
Unity 5.x Cookbook
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


The first three recipes in this chapter provide some ideas for adding some extra features to your game (pausing, slow motion, and securing online games). The next two recipes then present ways to manage complexity in your games through managing states and their transitions.

The rest of the recipes in this chapter provide examples of how to investigate and improve the efficiency and performance of your game. Each of these optimization recipes begins by stating an optimization principle that it embodies.

The big picture

Before getting on with the recipes, let's step back and think about the different parts of Unity games and how their construction and runtime behavior can impact on game performance.

Games are made up of several different kinds of components:

  • Audio assets

  • 2D and 3D graphical assets

  • Text and other file assets

  • Scripts

When a game is running, there are many competing processing requirements for your CPU and GPU, including:

  • Audio processing

  • Script processing

  • 2D physics processing...