So I wanted to change some behaviour of the default GUI skin in one of my editor scripts:
GUIStyle style = GUI.skin.button;
style.alignment = TextAnchor.MiddleLeft;
I placed those two lines in the OnGUI function and got the expected behavior, but then I noticed, that all default Unity buttons, like the ones from the player settings or the inspector changed as well. It appears I have permanently changed the default GUI skin. But how and why? I’m very sure, that I only added those to lines and used the “style” variable with a custom button in one of my editor windows, but nothing else.
Now I’m trying to revert back to default settings, but removing the two lines from my script and restarting Unity doesn’t change the style back. Is there not easy way like GUI.skin.defaults or something similar?
Thanks!