Exemplo n.º 1
0
        public void LoadScene(SceneDataScriptable scene, LoadSceneMode mode)
        {
            foreach (var sceneId in scene.sceneIds)
            {
                SceneManager.LoadScene(sceneId, mode);
            }
            if (mode == LoadSceneMode.Additive)
            {
                SceneManager.SetActiveScene(scene.Scene);
            }

            data = scene;
        }
Exemplo n.º 2
0
 public void LoadWithSceneLoader(SceneDataScriptable scene)
 {
     data = scene;
     SceneManager.sceneLoaded += LoadSceneAfterLoader;
     SceneManager.LoadScene(scene.loadingSceneId, LoadSceneMode.Single);
 }