yasirkula / UnityRuntimeInspector

Runtime Inspector and Hierarchy solution for Unity for debugging and runtime editing purposes
MIT License
1.68k stars 135 forks source link

IndexOutOfRangeException in Select right after AddToPseudoScene #17

Closed Flavelius closed 4 years ago

Flavelius commented 5 years ago

As the title says, AddToPseudoScene with Select right afterwards throws an IndexOutOfRangeException, as it seems related to the delayed rebuilding. Waiting for the rebuild works, but may not be realistically feasible, depending on the refresh interval. In my case i'm creating an object via code and want to have it immediately selected but it feels strange having to wait for a guessed amount of time before notifying the hierarchy. I don't think it troubles anyone if the selectionchanged callback was delayed in relation to the rebuild delay, so maybe retaining the selection internally until the rebuild is finished and applying it then would do it.

yasirkula commented 4 years ago

Reproduced the issue. Fix will be included in the next release.