diff --git a/Assets/Scripts/UI/UICameraSwitch.cs b/Assets/Scripts/UI/UICameraSwitch.cs index ba02ad78..5ff424ad 100644 --- a/Assets/Scripts/UI/UICameraSwitch.cs +++ b/Assets/Scripts/UI/UICameraSwitch.cs @@ -79,7 +79,10 @@ namespace QFramework.Example Near.gameObject.SetActive(mData.nearPos != default); Far.gameObject.SetActive(mData.normalPos != default); - +#if VR + Near.gameObject.SetActive(false); + Far.gameObject.SetActive(false); +#endif if (string.IsNullOrEmpty(mData.isOn)) { if (Near.isOn && Near.gameObject.activeSelf) @@ -123,7 +126,7 @@ namespace QFramework.Example private void Update() { -#if UNITY_STANDALONE_WIN +#if UNITY_STANDALONE_WIN && !VR if (Near.isOn == true || Far.isOn == true) { if (Input.GetKeyDown(KeyCode.W) || Input.GetKeyDown(KeyCode.A) || Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.D))