Game Development Reference
In-Depth Information
Figure 10-46. The Configuration dialog screen
With the aspect ratio restricted, you may notice that the game cannot be maximized. Also note that
the name on the title bar of the window is Garden Defender, the Product name. All in all, however,
you now have a quite respectable mini-game. There are, of course, any number of refinements and
improvements that could be made. A few choice features will be added in Chapter 11, the “bonus”
chapter.
Summary
In this chapter, you delved into the basics of the UnityGUI system for putting 2D text and control
elements on screen. You began by putting a rather large text message across the 3D scene to
mark the end of the game and added a couple of buttons to allow the player to quit or play again.
Application.Quit , you discovered, doesn't work in the editor or in a browser without some special
editor code. You also learned that the solely scripted UnityGUI doesn't adjust to the screen size
unless scripted to do so.
With the help of GUI Skins, you were able to set up a template for font and control elements that
added continuity to your GUI. In doing so, you learned that you could create your own template
“Styles” that you could use to override those that were automatically assigned to your control
elements. The template styles, you found, contained parameters that were not necessarily used for
every GUI control.
 
Search WWH ::




Custom Search