From 34feae945c2047728e53f9fc87a4610b05230534 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Mon, 7 Apr 2025 09:40:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8DUI=E4=B8=8D=E6=B6=88?= =?UTF-8?q?=E5=A4=B1=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/UI/UITimeTip.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/UI/UITimeTip.cs b/Assets/Scripts/UI/UITimeTip.cs index 5cb20689..44bcdcc2 100644 --- a/Assets/Scripts/UI/UITimeTip.cs +++ b/Assets/Scripts/UI/UITimeTip.cs @@ -85,8 +85,15 @@ namespace QFramework.Example imgTwen = DOTween.To(() => index, v => { index = v; - Img.sprite = sprites[index]; - Img.SetNativeSize(); + if (index >= 0 && index < sprites.Count) + { + Img.sprite = sprites[index]; + Img.SetNativeSize(); + } + else + { + Debug.LogError("ͼƬԽ"); + } }, endIndex, mData.time); From da52d47a203f09bcb2a09b06c64fb2552638bac7 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Mon, 7 Apr 2025 10:30:35 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=8C=E5=96=84VR=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/QFramework/Toolkits/UIKit/Scripts/UIPanel.cs | 6 +++--- Assets/Scripts/UI/UITimeTip.cs | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Assets/QFramework/Toolkits/UIKit/Scripts/UIPanel.cs b/Assets/QFramework/Toolkits/UIKit/Scripts/UIPanel.cs index d99a6250..fbedcf25 100644 --- a/Assets/QFramework/Toolkits/UIKit/Scripts/UIPanel.cs +++ b/Assets/QFramework/Toolkits/UIKit/Scripts/UIPanel.cs @@ -132,11 +132,11 @@ namespace QFramework } -#if VR - private void Update() + public virtual void Update() { +#if VR transform.localEulerAngles = Vector3.zero; - } #endif + } } } \ No newline at end of file diff --git a/Assets/Scripts/UI/UITimeTip.cs b/Assets/Scripts/UI/UITimeTip.cs index 8952af93..57bb3209 100644 --- a/Assets/Scripts/UI/UITimeTip.cs +++ b/Assets/Scripts/UI/UITimeTip.cs @@ -45,8 +45,9 @@ namespace QFramework.Example TypeEventSystem.Global.Register((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject); } - private void Update() + public override void Update() { + base.Update(); if (isRun) { object[] objects = new object[mData.values.Count];