Hi everyone.
I’ve very recently started working with custom editor windows and editor extensions in general.
I want to make my editor extension’s GUI resemble Unitys as closely as possible to make it fit in seamlessly and provide a (mostly) streamlined workflow when using it.
That said, I am trying to style the UI the same way the editor is styled.
For the most parts I’ve been googling a lot, reading forums about what classes and styles to use where, but I often result in having to experiment around with it myself.
I am still searching for a few elements (like the lighter background on the first item in the hierachy) and am having trouble finding them, mainly because I do not now how these things are named and therefore can’t find the corresponding documentations or forum questions. These are all small examples but it made me wonder, is there no place where all editor-GUI elements are listed with screenshots and links to the corresponding documentation? In the end, re-creating these small things wouldn’t be a problem, but I would rather like to use the proper classes and styles, simply because of the fact that they are already there somewhere.
Is there something you can suggest?
Thanks in Advance.
I think what you’re looking for is this: https://wiki.unity3d.com/index.php?title=Show_Built_In_Resources
The above thing is useful, however, when I want to mimic how unity looks I usually have more success looking through GitHub - Unity-Technologies/UnityCsReference: Unity C# reference source code. , there is quite a bit off guess work involved, but usually doesn’t take more than 5 mins down to find the style I want
You will likely end up having to duplicate some of the styles regardless, as much of the unity editor is locked behind internal classes and methods. I’ve found the EditorStyles class to be particularly useful as a quick way to style most common editor controls.
I also echo BinaryCats that the unity source is your best friend when it comes to creating custom editors. There is a lot of info that simply does not exist anywhere else.
