Grady
1
Hey guys,
I was just wondering, I have created a GUI Label, but I was wondering, how do you change the font size???
Here is my code:
var font : Font;
function OnGUI () {
GUI.skin.label.font = font;
GUI.Label (Rect (650, 650, 300, 50), "MY TEXT");
}
Thanks
-Grady
Pass a GUIStyle into the function and set the font size inside the GUIStyle.
http://unity3d.com/support/documentation/ScriptReference/GUIStyle.html
so your new code would be
var style : GUIStyle;
function OnGUI()
{
GUI.Label(Rect(650, 650, 300, 50), "HELLO WORLD", style);
}
The 3d platformer tutorial has a section on GUIStyles at page 58
Does this not work for Android?