- Home /
Can you apply a GUISkin to an Editor GUI?
Can you apply a GUISkin to an Editor GUI? Does this make sense? How does one customize controls otherwise? If you can apply a GUISkin, how does one load it from the project?
If this is documented somewhere, how do I find it?
Answer by Jeremy 6 · Oct 13, 2010 at 06:37 PM
The short answer is "Yes"!
Gui.skin = EditorGUIUtility.Load("LevelEditor/LevelEditorSkin.guiskin") as GUISkin;
The untility allows you to load resources but they have to be inside a "Editor Default Resources" folder which isn't inside the Editor folder but in the project root. Then you don't refer to the "Editor Default Resources" in the path but the hierarchy below that. Also you have to include the file name and the file extension (which seems to go against convention) but then you assign the GUI.skin normally.
It works as you would expect it would in any other situation. Still the documentation is somewhat lacking.
I hope this helps.
Your answer
Follow this Question
Related Questions
Initialising List array for use in a custom Editor 1 Answer
Custom Style EditorGUI 2 Answers
Adding UI elements to the 'script' part in the editor? 1 Answer
Simple headline / title for a Script in the Inspector 3 Answers
Property Drawer and Children 3 Answers