- Home /
Changing the font size of a GUI.Button in the inspector
I added a GUI.Label to my scene and then so I could more easily style my label I added a public GUIStyle member to the script and am feeding that style into the label. Like so:
public GUIStyle teamNameStyle;
That was pretty simple, so a big win there. Now I want to add a button to my scene and do the same thing. I want it to look exactly like buttons do with the default skin style but with just a larger font size. However, when I try the same method the button doesn't retain the style elements that make it look like a button. In other words, I can't use a GUIStyle member to simply change the font size. When I try, the button loses its border and ends up just looking like another label with a large font.
Is there a way to do this in the inspector? I'm sure it would be pretty simple in code but I'd like to do it in the inspector if I can.
Thanks!
Answer by omatase · Sep 07, 2014 at 01:41 AM
Hmmm, well it's working now even though I didn't do anything differently. I'm not sure what the issue was so it's hard to answer the question.