- Home /
Question by
xavram · Mar 23 at 05:14 PM ·
scene-switchingunloading
UnloadSceneAsync doesn't unload scene from hierarchy
In my "MainScene", I have a routine that loads a GameObject, loads a new scene and then moves that object over to the new scene. That part works fine.
But I want to unload the current scene and that part doesn't seem to work, I can still see the "MainScene" in the hierarchy, as well as its UI and whatnot.
here's what I have for loading the new scene and, in theory, unload the existing scene.
SceneManager.LoadScene("TestingArena", LoadSceneMode.Additive);
SceneManager.MoveGameObjectToScene(newObject, SceneManager.GetSceneByName("TestingArena"));
SceneManager.UnloadSceneAsync("MainScene");
Feel like I must doing something very minor to not have this working.
Comment