Closed michaelsakharov closed 9 months ago
I was looking at this issue with WinDbg and it is getting deleted it just takes a couple of minutes for the garbage collector to collect it.
I added && engineObj.IsDestroyed == false
to the conditional statement else if (customEditor.Value.Item1 == engineObj)
on line 116 in the InspectorWindow.cs file for the inspector menu to disappear after clicking delete. Seems like the inspector menu will stay there as long as nothing else gets selected.
The editor camera is ok to stick around.
I originally had the isDestroyed check on inspector but after switching to WeakReference i was hoping to use IsAlive instead. If its a GC issue then isDestroyed will have todo.
Not entirely sure what's happening here, but if you create a gameobject, and then delete it while it's selected, the Inspector continues to show it, and you can continue to edit it.
The Inspector uses a WeakReference, which means the garbage collector should be collecting the gameobject and the inspector should lose it. But something is holding onto the gameobject still.
https://gyazo.com/3915a998579d183ebd5ebf8cb55ca785