- Home /
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.
Answer by Jeff-Kesselman · May 10, 2014 at 09:12 PM
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.
Hi,
Thank you for response, but what I meant was changing the GUISkin of, let's say, the inspector. I do not have access to the source code of it but I know how to get it as an EditorWindow.
Thank you,
SeeSharp.
Answer by Loius · May 11, 2014 at 03:45 PM
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.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How to re-skin multiple buttons with different skins in unity 5 using C# 1 Answer
How to adjust the speed of an object? 1 Answer
Why does new GUIStyle() give "object reference not set to an instance of an object" error? 1 Answer