Challenge: UI Menu with Prefab Variants & Nested Prefabs
Tutorial
·
Beginner
·
+10XP
·
20 mins
·
(14)
Unity Technologies

In this tutorial, you will practice creating prefab variants out of your GameOver UI Menu in the Hover Racer project. By modifying the colors, GameObject Positions, and adding Nested Prefabs, you will create a variant of your GameOver UI Menu.
Languages available:
1. Make a prefab out of the Game Over Menu
- Drag the Game Over Menu into the Project Window, Asset Folder.
- Duplicate the Game Over Menu.
- Make the Text and box in the menu, red and blue respectively.
2. Add two prefab buttons ("Main Menu," "Replay") to the GameOver menu
- Make the Replay button a prefab
- Duplicate the Replay button
- Change its Text to "Main Menu."
- Adjust the two buttons so they both fit in the menu, side-by -side.
- Change the Replay button's Text and Image to red, and the Main Menu's Text and image to blue.
- You should now have two nested prefabs in the Game Over prefab, and two nested prefab variants