Search Issue Tracker
Fixed in 5.6.0
Votes
0
Found in
5.5.0b2
Issue ID
828376
Regression
No
Scene GetRootGameObjects returns only destination scene root objects after MergeScenes
Steps to reproduce: (or watch the video)
1. Open attached project. (SceneManager.zip)
2. Open scene: menu
3. Press play.
4. Press: Change Hierarchy button
5. Load scene: cube (with button in GameView)
6. Load scene: plane (with button in GameView)
7. Merge Scenes as: source scene = cube, destination scene = plane
8. Inspect editor hierarchy, and printed hierarchy in game view (uses GetRootGameObjects)
Expected result: Hierarchy in editor and in game view looks the same
Actual result: After merging scenes, the destination scene roots are not updated, GetRootGameObjects will return old objects, as before merging.
Notes:
. Same happens when entering playmode with already loaded scenes as additive.
. Not always reproduces. If "Change Hierarchy" is clicked after merge scenes (before it should not be clicked), then it works fine, for the first merge. Maybe it depends on how/when GetRootGameObjects calls are made?
. In editor hierarchy it looks fine.
Reproduced on: 5.5.0b2
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- SpeedTree does not move when using WindZone
- "Undeclared identifier 'LinearToSRGB'" error is thrown when creating a color variable with HDR color mode and assigning a Custom Render Texture target in Shader Graph
- Input System package is missing when creating a new HDRP project
- Inconsistent behaviour when interacting with different dropdown types with pointer events on parent Visual Element
- Hidden GameObjects won't re-enable when they have call "DontDestroyOnLoad" function
Add comment