Unity Issue Tracker - "'InstancedComponent' has been destroyed..." error is thrown when re-entering Play mode after saving a Prefab in Play Mode while Domain Reload & Scene reload are disabled
Fixed
UUM-7785
"'InstancedComponent' has been destroyed..." error is thrown when re-entering Play mode after saving a Prefab in Play Mode while Domain Reload & Scene reload are disabled
Unity: Asset - Database
Fixed
2023.2.X
2023.1.X
2022.2.X
2021.3.X
Won't Fix
2021.1.X
2020.3.X
2020.3.23f1 onwards
Accidentally created wrong port.
duplicate port
How to reproduce:
Open the user’s attached project “BugTest.zip”
Make sure Reload Domain and Reload Scene are disabled in Project Settings… > Editor
Enter Play mode
While in Play mode edit the "InstanceTest" Prefab and save the changes
Exit and re-enter Play mode
Observe the Console window
Expected results: No error occurs
Actual results: Prefab asset does not appear and an “'Instancnent' has been destroyed but you are still trying to access” error is thrown
Full error:
MissingReferenceException: The object of type 'InstancedComponent' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.Object.Instantiate[T] (T original) (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/UnityEngineObject.bindings.cs:271)
Instancer.Start () (at Assets/Instancer.cs:10)
Prioritise and Follow this issue
Have a workaround or additional info about this issue?