Exemple #1
0
        static void OnLevelFinishedLoading(sm.Scene scene, sm.LoadSceneMode mode)
        {
            // Stuff to do when scene has finished loading

            if (current.scenes[scene.buildIndex].gameScene)
            {
                CoreManager.current.inGame = true;
                CoreManager.current.player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>();
            }
            else
            {
                CoreManager.current.inGame = false;
            }

            CoreManager.UpdatePresence();

            sm.SceneManager.sceneLoaded -= OnLevelFinishedLoading;
        }