- Home /
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 ;-)
Answer by Adam-Mechtley · May 21, 2017 at 12:30 PM
If you use EditorGUI.PropertyField() (or EditorGUILayout version) it should use the custom property drawer for that property, if it has one.
Yeah, that's what I used before... but you re$$anonymous$$d me, that I should build better filters, thanks ;-) Any other Ideas?
Your answer
Follow this Question
Related Questions
Draw default property types in custom PropertyDrawer 2 Answers
Draw custom Property Field in Custom Editor 1 Answer
Custom Editor/Custom Property Drawer combo, breaks Enable button 1 Answer
Property Drawer SerializedProperty is null 2 Answers
How to find the first child serializedProperty inside a PropertyDrawer 1 Answer