Пример #1
0
 private void SceneManager_sceneLoaded(Scene arg0, LoadSceneMode arg1)
 {
     if (arg0.name == "Menu")
     {
         CameraMover.OnLoad();
     }
 }
Пример #2
0
        private void SceneManagerOnActiveSceneChanged(Scene arg0, Scene arg1)
        {
            CameraMover instance = CameraMover.Instance;

            if (instance != null)
            {
                instance.SceneManagerOnActiveSceneChanged(arg0, arg1);
            }

            twitchHandler.checkTwitchRegistration();
        }
Пример #3
0
        public void Awake()
        {
            if (CameraMover.Instance == null)
            {
                CameraMover.Instance = this;
                DontDestroyOnLoad(base.gameObject);

                if (objToLookAt == null)
                {
                    objToLookAt = new GameObject();
                    objToLookAt.transform.SetPositionAndRotation(lookAtPosition, objToLookAt.transform.rotation);
                    DontDestroyOnLoad(objToLookAt);
                }

                findCamera();
            }
            else
            {
                Destroy(this);
            }
        }