I am doing a custom editor (not property drawer) to change the display of a list in the inspector.
For example, I want every new element to show a popup selection field instead of property field. I also might want to add another field next to it later.
serializedList = serializedObject.FindProperty("list"); //list of int
for(int i = 0; i < serializedList.arraySize; i++)
{
var value = serializedList.GetArrayElementAtIndex(i);
index = EditorGUILayout.Popup(label, value.intValue, options.ToArray());
}
What I would like is to be able to add and remove values in the inspector (with the + and - buttons).
Basically I want the list to look like a default list in the inspector, but with my own element fields.
Is it possible to draw a default list, but only change the way elements are displayed?
I would prefer not to use property drawers for this, since I'm using the custom editor for other things also.
EDIT: I ended up using a property drawer to modify the rows, then just implementing a PropertyField in the custom editor containing the list.