修改VR版 UI逻辑

This commit is contained in:
shenjianxing 2025-03-24 09:29:31 +08:00
parent 4b193331d4
commit 4984936411

View File

@ -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))