// Use this for initialization
    void Update()
    {
#if !(UNITY_EDITOR)
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            StartCoroutine(VRModeManager.SwitchTo2DMode());
            SceneManager.LoadScene(HomeScene ?? "HomeScene");
        }
#endif
    }
Example #2
0
    // 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
    }
Example #3
0
 void Start()
 {
     vrMM = GameObject.FindObjectOfType <VRModeManager>();
 }