Beispiel #1
0
        /**
         * Prepares the sub-scene to become the new active scene, due to the active scene being removed.  The gameobject will be destroyed afterwards.
         */
        public void MakeMain()
        {
            if (mainCamera)
            {
                mainCamera.gameObject.SetActive(true);
                mainCamera.OnAwake(false);
                mainCamera.OnStart();
            }
            if (kickStarter)
            {
                kickStarter.gameObject.SetActive(true);
            }

            KickStarter.SetGameEngine(gameObject);
            KickStarter.mainCamera = mainCamera;

            UnityEngine.SceneManagement.SceneManager.SetActiveScene(gameObject.scene);
            Destroy(gameObject);
        }