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...