- Home /
Android OnGUI size
Hi,
I'm trying to use the OnGUI to display some information about my scene throughout its existence. I have a GUIStyle attached to the script that is displaying the information and in the editor changing this will change the size or other aspects of the text, but when I move it to my Android device the font size reverts. Any ideas why? (simplified version of the script below)
public GUIStyle style;
void OnGUI() {
GUI.Label(new Rect(0, 0, 150, 30), "Score is now : " + scoringController.Instance.Score, style);
if(GUI.Button(new Rect(0, 30, 150, 30), "Reset")) {
Application.LoadLevel(0);
}
}
Thanks in advance
Comment
Best Answer
Answer by milesokeefe · Oct 04, 2011 at 09:05 PM
Android Builds don't support dynamic font sizes. To use different font sizes, you have to change the size in the font importer. So you'd have a seperate font file for each size.