tag
#stale-data
2 items (2 fixes)
fixes
✓ 26.07.08e
"Edit-mode Destroy() is deferred: scene queries return stale objects"
GameObject.Destroy() in edit mode is deferred; a query fired right after returns the previous build's objects.
editorlifecycle
✓ 26.07.22
"Static registry persists across editor Play restarts: gate on live objects"
A C# static list/registry survives editor Play stop/start and code hotloads, holding references to destroyed GameObjects: gate iteration on IsValid(), don't rely on clearing alone. It can also mask a new scene's state when stale high-priority entries outrank it. Hand registrations back in OnDestroy.
editorlifecycle