A regular custom PropertyDrawer seems to draw the custom extension property outside of the extensions list (“Hello?” label & “Test” button):
The extensions which come with the Localization package use a “PropertyDrawerExtended”, but I can’t access that one from my own scripts. How do you write drawers for custom collection extensions?
Thanks for any hints.
PropertyDrawerExtended is just a PropertyDrawer with some extra utility methods, mainly for IMGUI. You can go without it and use a normal PropertyDrawer.
Thanks for the swift answer! I’ll move on with a regular PropertyDrawer for now. Is there a way to have the extension be drawn inside the extension list though? In my first screenshot you can see that the “Hello?” label and the “Test” button are drawn outside.
That’s because you are using GUILayout, you need to use the rect that is passed into the property drawer. You cant use the layout features inside of a PropertyDrawer.
Note that for performance reasons, EditorGUILayout functions are not usable with PropertyDrawers.