From ffc4ac6b86ff9bc78cbb689c55ea523d12c0f068 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Thu, 3 Apr 2025 13:55:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20VR=20=E4=B8=AD=20=20UIBtns?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E9=97=AE=E9=A2=98=20=E5=BC=80=E6=94=BE=20VR?= =?UTF-8?q?=20=E4=B8=AD=20=E9=BB=98=E8=AE=A4=E9=95=9C=E5=A4=B4=E5=92=8C?= =?UTF-8?q?=E8=BF=91=E8=B7=9D=E7=A6=BB=E9=95=9C=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UIKit/Scripts/Resources/VRUIRoot.prefab | 8 +-- Assets/Scripts/UI/UICameraSwitch.cs | 50 +++++++++---------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/Assets/QFramework/Toolkits/UIKit/Scripts/Resources/VRUIRoot.prefab b/Assets/QFramework/Toolkits/UIKit/Scripts/Resources/VRUIRoot.prefab index 605d1e38..8d4c04a9 100644 --- a/Assets/QFramework/Toolkits/UIKit/Scripts/Resources/VRUIRoot.prefab +++ b/Assets/QFramework/Toolkits/UIKit/Scripts/Resources/VRUIRoot.prefab @@ -554,11 +554,11 @@ RectTransform: m_Children: [] m_Father: {fileID: 7801786202371978394} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} + m_SizeDelta: {x: 1920, y: 0} + m_Pivot: {x: 1, y: -0.0000015497208} --- !u!114 &5603514822568233693 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/UI/UICameraSwitch.cs b/Assets/Scripts/UI/UICameraSwitch.cs index b9149925..4dcc3e13 100644 --- a/Assets/Scripts/UI/UICameraSwitch.cs +++ b/Assets/Scripts/UI/UICameraSwitch.cs @@ -83,28 +83,28 @@ namespace QFramework.Example Far.gameObject.SetActive(mData.normalPos != default); -#if VR - Transform trans = UIRoot.Instance.transform.Find("ZFrame"); - if (mData.vrPos != default) - { - mData.nearPos = mData.vrPos; - mData.nearRot = mData.vrRot; - mData.nearTime = mData.vrTime; - mData.isOn = "near"; - } - else - { +//#if VR +// Transform trans = UIRoot.Instance.transform.Find("ZFrame"); +// if (mData.vrPos != default) +// { +// mData.nearPos = mData.vrPos; +// mData.nearRot = mData.vrRot; +// mData.nearTime = mData.vrTime; +// mData.isOn = "near"; +// } +// else +// { - if (mData.nearPos != default) - { - mData.isOn = "near"; - } - else if (mData.normalPos != default) - { - mData.isOn = "normal"; - } - } -#endif +// if (mData.nearPos != default) +// { +// mData.isOn = "near"; +// } +// else if (mData.normalPos != default) +// { +// mData.isOn = "normal"; +// } +// } +//#endif if (string.IsNullOrEmpty(mData.isOn)) @@ -144,10 +144,10 @@ namespace QFramework.Example break; } } -#if VR - Near.gameObject.SetActive(false); - Far.gameObject.SetActive(false); -#endif +//#if VR +// Near.gameObject.SetActive(false); +// Far.gameObject.SetActive(false); +//#endif }