Want font?

As promised, we're going to try overriding the default look of the UI button control using our custom GUI skin (or child's cupcake costume). At the top of the OnGUI function, between the curly brackets, add this line:

GUI.skin = customSkin;

Save the script. Now, the custom GUI skin called MyGUI that we linked to this script will knock out the default skin like putting on a different costume. Let's make a quick change to MyGUI so that we can see the results.

Click on MyGUI in the Project panel. Now, check out the Inspector panel. There's a loooong list of goodies and controls that we can customize. This is why many of the Unity projects that you see use the default GUI—customizing all this stuff takes a long time!

Click on the arrow next ...

Get Unity 4.x Game Development by Example Beginner's Guide 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.