Пример #1
0
    void Loading(int scene)
    {
        if (scene == -1)
        {
            Application.Quit();
        }
        else
        {
            _loading = true;

            /*Load data*/

            if (!levelLogic.IsLastScene())
            {
                SceneManager.UnloadSceneAsync(levelLogic.currentScene);
            }
            async = SceneManager.LoadSceneAsync(scene, LoadSceneMode.Additive);
        }
    }