How do I change GUISkin of an EditorWindow without having source code access?

Hey,

I’m trying to change the GUISkin of an EditorWindow and I don’t have access to the source code.

I was told to use reflection, but couldn’t get that working.

What is the easiest way to change the GUISkin of an EditorWindow without having access to the source code? Is it even possible?

All help is appreciated.

Edit: What I meant is “calling” GUI.skin = myGuiSkin; on, let’s say the Inspector.

Thank you,

SeeSharp.

Um, Im not sure what you mean. There is no “GUI skin of a class.” GUISkin is set globally in the variable GUI.skin.

If some library is setting it internally then your best bet is to locate the GUISkin asset it is using and modify that.

You can’t change what skin is used by a different Editor element. You can change the skin it’s using though.

I know I’ve tried this before, but I can’t remember if it worked.

What happens if you directly modify the GUI elements of the default skin?

GUI.skin.button.alignment = TextAnchor.LowerRight;

I’m pretty sure it “messes up” the editor and actually affects everything (until Unity restarts), but there was probably some reason I didn’t end up using it.