I was looking for a way to change the font size of one of my Labels in Unity and one of the scripts I tried changed the font size of all of the text fields I had in Unity.
How can I change them back to default.
I precisely don’t remember, what font size in Unity by default. But in your case you can create GUISkin in your folder with Assets (Create-> GUISkin). This skin have all styles used by Unity by default. Also in it the font by default is exposed. You can add own style in the section Custom (look in the Inspector). Let’s assume that you added the style with the name myLabel(write on CSharp):
public GUISkin mySkin = null; //reference on your skin
void OnGUI() {
GUI.skin = mySkin; //change defaul skin on your skin
GUI.Label(new Rect(0, 0, 100, 50), "Label1"); //create label with style "label" of skin
GUI.Label(new Rect(0, 50, 100, 50), "Label2", "myLabel"); //create label with your style "myLabel" of skin
}
I hope it will help you.