From bf78008c8a4aa7d9323a7f29c27598790f417f81 Mon Sep 17 00:00:00 2001 From: Lihao7788 <2470304407@qq.com> Date: Thu, 3 Apr 2025 17:31:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9UITimeTIpBug?= 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..8952af93 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.Log("UITimeTipChao suo Yin"); + } }, endIndex, mData.time);