Scene management
Before we jump into adding some new features to the game, we should step back a bit and address how we will transition from scene to scene. Currently, we have two scenes developed for our game: the Splash and Map scenes. Also, in this chapter, we will add two more scenes, Game and Catch. However, we currently have no way of managing scene transitions or game-object lifetime. Ideally, we want some master object and/or script that can do all that for us. This is exactly what we will build, and we will call it Game Manager.
Hold your excitement for a minute. In order to seamlessly load and transition between scenes, we want to do a little housekeeping with our current scenes. Open up Unity and perform the following instructions to clean and reorganize the current game scenes:
- Ensure that the Map scene is loaded in the Hierarchy window. Create a new empty game object by selecting the GameObject | Create Empty menu.
- Rename the new object MapScene and reset the transform to zero...