CustomEditor with Nested ReorderableLists

I am working on an editor that implements nested ReorderableLists. I am able to successfully nest the lists, but I am not able to select a list item in the nested list, thus the list’s remove (“-“) button is never active. I am able to add new list items fine. I implemented the onSelectCallback delegate and do receive touches on list items in the nested list.


Is there someway to force the item to receive the focus when it is touched?
I tried GrabKeyboardFocus to no avail.

I know it’s been a while since this was asked but I had to deal with it today and I Google’d and found this question unanswered. So here’s a dirty solution if you’re pressed for time.

The short (less than 20 script Github download…) is you need to cache your ReorderableList.

(it should be noted this isn’t recommended)

One example would be to create a:

static System.Collections.Generic.Dictionary<string, ReorderableList> sublists;

… in your class and when you create your lists just add them if the key isn’t found.

E.g. (assuming you have a SerializedProperty named property and a Rect named rect)

if (sublists.ContainsKey(property.propertyPath))
    sublists.Add(property.propertyPath, new ReorderableList(property.serializedObject, property);

Anyhoo, if you want some good info on this check out @Adam-Mechtley 's posts on the subject
(here’s a good place to start).