- Home /
GUI.Label fonts
Hey,
I am trying to change the font of a GUI.Label to a font i have imported.
I read some other questions here that say to use a GUIStyle in my label and when i do that it doesn't update the text in the Label
public GUIStyle TextStyle;
void Start () { TextStyle = new GUIStyle();
} void OnGUI() {
GUI.Label (new Rect (10, Screen.height - 20, 300, 20), "Yeti Score: " + Score.YetiScore.ToString(),TextStyle); GUI.Label (new Rect (Screen.width - 150, Screen.height - 20, 300, 20), "Snow Plow Score: " + Score.SnowPlowScore.ToString(),TextStyle); } }
Comment
Best Answer
Answer by Eric5h5 · Sep 17, 2010 at 07:13 AM
I'm not sure why you're reinitializing the TextStyle variable in Start...take that out.