// Use this for initialization void Update() { #if !(UNITY_EDITOR) if (Input.GetKeyDown(KeyCode.Escape)) { StartCoroutine(VRModeManager.SwitchTo2DMode()); SceneManager.LoadScene(HomeScene ?? "HomeScene"); } #endif }
// Update is called once per frame void Update() { #if !(UNITY_EDITOR) if (NetworkManager.singleton == null) { return; } else if (Input.GetKeyDown(KeyCode.Escape)) { if (NetworkManager.singleton.IsClientConnected()) { NetworkManager.singleton.StopClient(); StartCoroutine(VRModeManager.SwitchTo2DMode()); } } #endif }
void Start() { vrMM = GameObject.FindObjectOfType <VRModeManager>(); }