Game Development Reference
In-Depth Information
11. Change the last action to EnableObject(popup_MainMenu) to make the
main menu show up again.
12. Lastly, click on the popup_Level3Repeat panel, and open the Button1 hier-
archy.
13. Change the first action to CameraLookUp() to point the camera towards the
sky (which makes the pop ups show up in a visually appealing way).
14. Change the next action to LoadLevel3 . This will tell the GameMgr script to
destroy the _level3 GameObject (and all of its children), and then reload
the _level3 GameObject, thereby resetting its state.
15. Change the final action to DisableObject(popup_Level3Repeat) to
hide this panel while still leaving it attached to the MainCamera GameObject
persistent in _global .
Congratulations! You have finished updating the pop ups for Level3 . Let's move on
to pop ups of Level2 .
Updating level 2 pop ups
Now that pop ups of level 3 are updated, let's follow the same procedure to update
the pop ups for the second level.
1. Load the TESTBED2 scene file. Find the MainCamera GameObject, and
open hierarchy to display the UI pop up's child objects.
2. Press Shift , select all of the pop ups, and copy them with Ctrl + C .
3. Load the MAIN scene file. Select the MainCamera GameObject, and paste
the level 3 pop ups with Ctrl + V .
4. Now we need to change the behavior of the buttons. Starting with
popup_Level2Start , select this panel, and open the Button1 hierarchy.
5. Change the first action of this button to EnableOb-
ject(raceStarterPrefab) . Set the reference to raceStarterPrefab
by dragging-and-dropping it from the Project tab directly into the data field of
Search WWH ::




Custom Search