private void SceneManager_sceneLoaded(Scene arg0, LoadSceneMode arg1) { if (arg0.name == "Menu") { CameraMover.OnLoad(); } }
private void SceneManagerOnActiveSceneChanged(Scene arg0, Scene arg1) { CameraMover instance = CameraMover.Instance; if (instance != null) { instance.SceneManagerOnActiveSceneChanged(arg0, arg1); } twitchHandler.checkTwitchRegistration(); }
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); } }