Chapter 9. Designing Menus
In order to create a rounded example game in this chapter, we will look at creating a separate scene to our existing island scene to act as a menu. Menu design in Unity can be achieved in a number of ways using a combination of built-in behaviors and 2D texture rendering.
Game titles can be added using GUITextures, GUI class scripting, or by adding textures to a flat plane primitive; these may be used to create for example a splash screen with developer logos, parts of a game's GUI or loading screens. In this chapter, you will learn:
Two different approaches to interface design
Controlling GUITexture components with scripted mouse events
Writing a basic Unity GUI script
Defining 2D spaces with Rect values
Styling GUI code and using GUI skin assets
Loading scenes to navigate menus and loading the game level
When adding interactive menus, you may wish to consider two different approaches, one using Unity's simple, component based GUITextures—an area we've already explored...