Creating the menu with the Unity GUI class and GUI skins
As we already have a working menu, rather than removing it from our scene, we will temporarily disable the objects that make it up.
Disabling game objects
One at a time, select the menu_playBtn, the menu_instructionsBtn, and the menu_quitBtn in the Hierarchy, and deactivate them by doing the following:
- In the Inspector, uncheck the checkbox to the left-hand side of the name of the object at the top
- Ensure that this has turned the text of the object to light gray in the Hierarchy and that the element itself has disappeared from the Game view preview—you should now be left with only the game title logo texture visible
Creating the menu
For this example, we'll be using Unity's GUI
class, and make ...
Get Unity 3.x Game Development Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.