SceneInstance loses information

Hey guys.

I’ve got another unit test not working sadly with loading and unloading scenes. My code looks like:

string sceneName = "Assets/Scenes/TestScene/AddressableTestScene.unity";
            SceneInstance loadedScene = new SceneInstance();
            var loadingOperation = Addressables.LoadSceneAsync(sceneName, LoadSceneMode.Additive).Completed += scene =>
            {
                loadedScene = scene;
            });

            while (!loadingOperation.IsDone)
            {
                yield return null;
            }

            Assert.IsNotNull(loadedScene.Scene);

            loadingOperation = Addressables.UnloadSceneAsync(loadedScene).Completed += unloadedScene =>
            {
                loadedScene = unloadedScene;
            });

            while (!loadingOperation.IsDone)
            {
                yield return null;
            }

            Assert.IsFalse(loadedScene.Scene.isLoaded);

The loading operation fills correctly the SceneInstance with all necessary information. As soon as I try to unload it, the SceneInstane information is completely lost and I can’t access name and/or path of that SceneInstance, although it is still loaded.

5850325--621490--sceneInstance.png 5850325--621493--sceneInstance2.png

Can someone tell me what I am missing here?

Thanks,
Patrick

I’ll forward this over to the team for them to have a look! Which version of Addressables are you using?

Unity 2019.3.0f3 Addressables 1.8.3

After connecting with the team, it was advised that you file a bug report so we can look into this further: Unity QA: Building quality with passion