Game Development Reference
In-Depth Information
preferences for GUI elements. To explore this, open the mainmenu
scene. Open mainmenu.js in the script editor. To the very top of the
script add var myStyle: GUIStyle;
Step 20. Select the Main Camera in the Hierarchy and locate the
attached mainmenu script in the Inspector. It will now have a style
component added as shown in Figure 6.5 .
FIG 6.5 The GUI Style component.
Step 21. In the Inspector you can set all the values pertaining to the
look and feel of your GUI element. For detailed information on what
all these settings do, see http://unity3d.com/support/documentation/
Components/class-GUIStyle.html .
Step 22. To change the font on a button, visit http://1001freefonts
.com/ and download a font to use. Unzip the file and place the .ttf
font file into the Project. When selected in the Project, the Inspector
displays font details, including the size. This is where you can change
the size as required. Ensure that you click on the apply button at the
bottom if you change these settings.
Search Nedrilad ::




Custom Search