Does anyone know if there’s a way to get PropertyFields to use the current GUI.skin? It seems like they always use the default editor skin…?
The Editor does not use GUI.skin, it uses EditorStyles.
Some EditorGUI functions allow for passing in a custom style, such as labels Unity - Scripting API: EditorGUI.LabelField
If you want to override the other styles you could try using reflection to modify the EditorStyles, just make sure to set it back afterwards or you will break the whole UI.
Strange, I’ve been using GUI.skin in the editor for years!
For example this works fine:
public override void OnInspectorGUI()
{
GUISkin origSkin = GUI.skin;
GUI.skin = mySkin
//...
GUI.skin = origSkin;
}
But it doesn’t work with PropertyFields… so was wondering if there was a way to force them to use the current GUI.skin.
What are you using in between that?
EditorGUI or GUI?
Mainly EditorGUI, but I think the occasional GUI (e.g. for buttons).
did you find a way?
Nope.