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

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.