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
- UI Builder can't set a background image to a sprite from a multi-sprite spritesheet in the Resources folder
- Light2D freeform does not render the internal part when rendered in certain shapes
- Using AddCopyPass causes an incorrect merging of passes.
- Negative Enum value is not pasted correctly when copying from another array
- Silent Crash when generating Lightmap UVs for a model with a large object scale
Add comment