コード例 #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 UNITY_5_3 || UNITY_5_4 || UNITY_5_3_OR_NEWER
            if (mainCamera)
            {
                mainCamera.gameObject.SetActive(true);
            }
            if (kickStarter)
            {
                kickStarter.gameObject.SetActive(true);
            }

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

            UnityEngine.SceneManagement.SceneManager.SetActiveScene(gameObject.scene);
            Destroy(gameObject);
                        #endif
        }
コード例 #2
0
ファイル: SubScene.cs プロジェクト: ManuelAGC/StarEater
        /**
         * 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);
        }
コード例 #3
0
ファイル: SubScene.cs プロジェクト: cvkumar/out-of-body
        /**
         * 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);
                if (KickStarter.settingsManager.blackOutWhenInitialising)
                {
                    mainCamera.ForceOverlayForFrames(4);
                }
            }
            if (kickStarter)
            {
                kickStarter.gameObject.SetActive(true);
                KickStarter.SetGameEngine(kickStarter.gameObject);
            }

            KickStarter.sceneChanger.SubScenes.Remove(this);
            Destroy(gameObject);
        }