I can change my font in the inspector, but I don’t want to do that every time I make a level, etc. My levels are mostly governed by the same scripts, so I’d really like to set my font to Courier in code. I’d also like to set the text color.
So, I have
` public GUIStyle font;
float fontSize;
void OnGUI ()
{
fontSize = Screen.width * 0.03f;
font.fontSize = (int)(fontSize);`
That all works fine. So I can manipulate the font size in code. How do I get the actual font and the color in code? I see that there’s a GUIStyle.font, but I don’t know how to change it. Then I also just don’t even see any sort of GUIStyle.color or anything like that.