https://metaplay.io logo
Improved Model Inspector
# questions-and-feedback
a
Model Inspector is currently a bit of a pain to work with hierarchies consisting of multiple child hierarchies because it doesn't remember the state of the hierarchy after exiting and re-entering playmode. My suggestion: - open the hierarchy all the way to the previously selected entry when playmode is re-entered I have already extended the current ModelInspector script to do this, so message me if you want to test my version and implement it with yours.
n
Hi! Thanks for the suggestion! I'll forward it to the relevant developer. I definitely agree that this would be helpful. 👍
j
I'd be happy to take a look at your fix and see if we can port it to the SDK
Feel free to share it here using some paste site or you can email it to me at jurjen.biewenga@metaplay.io
a
it's made mostly with the help from Claude so unfortunately I can't guarantee if that is a proper implementation at all but hey, it works 😅
j
Hmm, that looks a bit overkill, I think you can get away with just removing
NonSerialized
on
ModelInspectorWindow.cs:64
. Haven't tested in depth but it appears to work fine
a
unfortunately that does not seem to work
the hierarchy is reset when re-entering playmode
j
TreeViewState          _treeViewState;
is the line you edited right?
Even with Reload domain on enter play mode enabled, and with recompiling code, it seems to work in Unity 2022.3.42f1 (on my machine 😅 )
a
ahh indeed removing NonSerialized from _treeViewState works, but only when Reload Domain is enabled
we would prefer having the Reload Domain disabled for rapid iteration
j
Huh, in my testing it worked both ways, let me test some more
ah nevermind, apparently it wasn't enabled in my testing 😅 , turns out if you have the "Enter Play Mode Options" setting disabled, it treats it as all enabled
a
haha no problem 👍
j
Here's a git patch that should resolve the issue
a
nice! thanks for your help!