- Home /
GUISkin Label Font Size Doesn't Change
I created a default GUISkin and haven't changed anything about it except for the font size for buttons. Now I'm trying to increase the font size for labels, and it has no effect. However, I can change the font size in code by applying a GUIStyle to the label, such as this:
var style = new GUIStyle();
style.fontSize = 18;
style.normal.textColor = Color(1, 1, 1);
GUI.Label(Rect(10, 10, 400, 20), string, style);
Why would that work, but setting the size to 18 on my GUISkin in the Inspector doesn't?? And why can I change the font size for buttons in the Inspector, but not for labels?
Comment
Answer by the_reductionist · Jul 23, 2012 at 06:58 PM
I had to assign the font again specifically for labels, in addition to assigning it globally for the GUISkin. This was done in the Inspector window, however, not through code. Hope that helps.
Your answer
![](https://koobas.hobune.stream/wayback/20220613063949im_/https://answers.unity.com/themes/thub/images/avi.jpg)