Challenge: Prefab Inspector Controls (Open, Select, Revert, Overrides)

Tutorial

·

Beginner

·

+10XP

·

25 mins

·

(14)

Unity Technologies

Challenge: Prefab Inspector Controls (Open, Select, Revert, Overrides)

In this challenge, you will practice modifying your prefabs, and then applying or reverting these changes in subsequent prefab models.

Languages available:

1. Make the Buttons’ Images blue, and all Text red by “Applying” and “Reverting changes

  • To make the Buttons’ Images blue, right click on “Source Image,” which should be bolded.
    • To make the Text Red, right click on the Color parameter in the red Text’s Inspector, and click “Apply”
    • To make the blue Text red, right click on the color parameter and select “revert”
    • To make the Red Image blue, right click on the Source Image in the Inspector and select “Revert.”

2. Add another GameOver UI prefab to the scene, and unpack it completely from the prefab

  • Add another GameOver UI.
    • Position it above the first.
    • In the Hierarchy, right click on the prefab and select “Unpack Prefab Completely.”
    • Adjust the prefab so the “Game Over” text is in the middle of the menu. Be sure to scale the text up so the messaging is clear.
    • Reduce the size of the Replay button, and position it at the bottom of the screen.

3. Add another GameOver UI prefab to the scene, and modify its children’s Positions in the Prefab Editor Window

  • Add another GameOver UI.
    • Position it above the second..
    • In the Hierarchy, right click on the prefab’s carrot to enter Prefab Mode. Alternatively you can double click on the prefab in the Project Window.
    • Toggle off Auto-Save.
    • Add another button “Return Home” to the middle of the menu.
    • Position the Game Over Text in the middle of the menu.
    • Click “Save” and return to the main menu.
    • Review your changes to the linked prefab.

Complete this tutorial