Pausing the scene

Now that we have seen how easy it is to create a snapshot, we can see a real-world example of how to recall a saved snapshot programmatically and at runtime, by building a pause feature. If you have played any single-player game, you will certainly be familiar with some form of pause button that pauses or freezes game play. In our example, the pause button will freeze the game, but will also adjust the audio to let the player know the game is paused. Let's see this in action by following the exercise here:

  1. Open the Audio Mixer window and click on the on the Snapshot in the Snapshots list. Rename the snapshot, Unpaused. Click on the Snapshot1 item from the Snapshots list and rename it Paused.
  2. From the menu, select GameObject ...

Get Game Audio Development with Unity 5.X 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.