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:
- 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.
- From the menu, select GameObject ...