- Home /
GUIStyle for GUI.label doesn't work for android?
Hi guys today i tried adapting my GUI.Label, making the font bigger and it worked! until I watched on my android device, it seems that the GUIstyle has no effect on my device because on my pc the text changes, is there an other way to make my text bigger without the GUIStyle?
----CODE----
var score = Totalscore.score;
var scoreText:String = "Your total score is: ";
var lvlText:String = "Your lvl is: ";
var shotCounterStyle : GUIStyle;
var customGuiStyle : GUIStyle;
public var quitRect : Rect;
function Update () { scoreText = "Your total score is: " + Totalscore.score; }
function OnGUI () {
if (GUI.Button (Rect (Screen.width/2-147, Screen.height/2+90,300,60), "", customGuiStyle)) {
Application.LoadLevel (0);
}
var centeredStyle = GUI.skin.GetStyle("Label");
centeredStyle.alignment = TextAnchor.UpperCenter;
GUI.Label (Rect (Screen.width/2-90, Screen.height/2-35, 200, 50), scoreText,shotCounterStyle);
GUI.Label (Rect (Screen.width/2-90, Screen.height/2+25, 200, 50), "Music By Timjim" ,shotCounterStyle);
if(GUI.Button (Rect (Screen.width/2+150, Screen.height/2-60,60,60), "reset"))
{
Totalscore.score = 0;
}
}
Comment
Your answer
Follow this Question
Related Questions
GUI Styles for iPhone/Android - font/button sizing? 3 Answers
Change Font Style OnMouseEnter 0 Answers
Optimizing OnGUI - Too many gui elements? 2 Answers