SubjectNerd-Unity / ReorderableInspector

Automatic reorderable lists for Unity game engine components
MIT License
483 stars 48 forks source link

Stops working after x items... #16

Open rakkarage opened 5 years ago

rakkarage commented 5 years ago

untitled

seems to stop working after around 10 items? or

huh

Example: https://github.com/rakkarage/TestReorderableInspectorNew

edit: after more editing i got my code under the limit maybe it is just a reasonable limitation by unity or ri

Xriuk commented 3 years ago

The problem is in ReorderableArrayInspector.cs script, at line 671: listData = listIndex.Find(data => property.propertyPath.StartsWith(data.Parent)); The StartsWith(data.Parent)) part of it caused in my and your case to fail rendering correctly the list because it was searching for "Floor Room" and "Floor Simple" and finding just "Floor" in your case, because they both starts with "Floor".

I have solved it by replacing the code with this: listData = listIndex.Find(data => property.propertyPath.StartsWith(data.Parent + ".") || property.propertyPath == data.Parent);