Now that we have a fully functional system for loading and unloading scene files, we will dedicate our attention to the integration and refactoring of the remaining GameObjects, hierarchies, and scripts.
To refactor our pop-up system, perform the following steps to complete the moving of our game content from the testbed
scene file to the MAIN
scene file.
Let's begin by refactoring the pop-up panel system:
Under _global, ensure that the player (named Player1), camera (named MainCamera), and game (named Game) child objects can be found. Also make sure that a GameObject of type
GUITexture
named score is present as shown in the following screenshot:We will change the behavior of the pop ups that are shown at the start and completion of each level. Rather than instantiating them from a Prefab, we will add them at design time in the editor and selectively activate and deactivate them as necessary. This will make the task of refactoring...