-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Hey João,
I'm trying 3.2-Pre.1 version.
A scene is not unloaded. Here is an example:
private static readonly ILoadSceneInfo LoaderSceneInfo = new LoadSceneInfoName("Assets/Client/Scenes/Loader.unity");
private static readonly ILoadSceneInfo MainSceneInfo = new LoadSceneInfoName("Assets/Client/Scenes/Main.unity");
private ISceneManager _sceneManager;
void Start()
{
_sceneManager = new AdvancedSceneManager(true);
}
... 2 seconds later
private void _OnConfigFileLoaded()
{
_sceneManager.SceneLoaded += _OnSceneLoaded;
_sceneManager.LoadSceneAsync(MainSceneInfo, true);
}
private void _OnSceneLoaded(Scene scene)
{
_sceneManager.SceneUnloaded += _OnSceneUnloaded;
_sceneManager.UnloadSceneAsync(LoaderSceneInfo);
}
private void _OnSceneUnloaded(Scene scene)
{
Debug.LogWarning($"Scene unloaded: {scene.name}");
}
Here is a screenshot from the debugger to see that this scene is under the manager's control.
I hope this helps)
Thank you
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working