c# - How to change ReorderableList's element height in Inspector view -


i created custom inspector journal class display list<t> reorderablelist<t>. display class structure wrote following code:

private reorderablelist list;  private void onenable() {             list.drawelementcallback =             (rect rect, int index, bool isactive, bool isfocused) =>             {                 rect = new rect(rect.x, rect.y, rect.width, rect.height * 2);                 var element = list.serializedproperty.getarrayelementatindex(index);                 rect.y += 2;                 editorgui.propertyfield(                     new rect(rect.x, rect.y, 100, editorguiutility.singlelineheight),                     element.findpropertyrelative("name"), guicontent.none);                 editorgui.propertyfield(                     new rect(rect.x + 100, rect.y, rect.width - 100, editorguiutility.singlelineheight),                     element.findpropertyrelative("image"), guicontent.none);                 editorgui.propertyfield(                     new rect(rect.x, rect.y + editorguiutility.singlelineheight + 2f, rect.width, editorguiutility.singlelineheight),                     element.findpropertyrelative("description"), guicontent.none);             }; 

i expected displayed this:

[1: name] [1: picture] [1: description] [2: name] [2: picture] [2: description] 

but in result, "description" of first element overlapping "name" , "picture" of second element , on.

enter image description here

and can't find way increase reorderablelist's element height. setting rect.min doesn't help

list.elementheight = editorguiutility.singlelineheight * 2f; 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -