Search Issue Tracker
Fixed in 5.4.0
Unloading a scene can destroy non-instantiated prefabs that are indirectly referred to by other currently-loaded scene
How to reproduce:
1. Open the attached project "UnloadSceneBug.zip"
2. Open and play Scene1
3. Left Mouse Click to the game view, it will load Scene2
4. LMC again and it will unload Scene1
5. Notice that message which was displayed by Scene1 disappears and the one in Scene2 is "success"
6. Build and run the project for standalone target
7. Repeat step 3 and 4
8. Notice that message which was displayed by Scene1 disappears and the one in Scene2 is "ndataRedirect was destroyed"
Note: By "indirect references" user means that an object in Scene2 contains a reference to a non-instantiated prefab X, and X in turn contains a reference to a non-instantiated prefab Y. After unloading Scene1, X remains valid, but Y disappears.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [2023.2] HDRP Asset Settings Helper throws a NullReferenceException
- [URP] SubmitRenderRequest with NativeRenderPass + Upscaling doesn't work
- “ArgumentOutOfRangeException” error appears when inserting a double character if using “SetValueWithoutNotify” on UI Toolkit’s TextField
- Particle System emission delays between particle generations when playing the simulation
- EditorUtility.DisplayDialog is not shown when Input.GetMouseButtonDown is called a second time