Getting CustomPropertyDrawer from SerializedProperty

Hey Folks,
I’m iterating through the serializedProperties of a given ScriptableObject and I want to increase some nested object increased functionality (like renaming a SO, creating a new one, have a popupSelection from a given abstract class, getting the components of a GameObject etc)


My Problem now is, the moment, I cycle through every serializedProperty, I have to:

  • Create a Foldout (Done)
  • Indent correctly (++ is easy, but how to – properly?Through GetEndProperty…?)
  • Apply CustomPropertyDrawers ( I have absolutely no Clue, how to do that, I don’t even know from where to fetch that Attribute)

It would be great if you could help me with one of those 2 Issues.

Thanks in Advance :wink:

If you use EditorGUI.PropertyField() (or EditorGUILayout version) it should use the custom property drawer for that property, if it has one.