From bc1cb6da854cb2e9144f10ed55330a537ecdca16 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期三, 04 三月 2026 14:35:57 +0800
Subject: [PATCH] 466 h5版本 资源规则修改 打包修改(未完成 勿拉取)

---
 Main/System/HeroUI/GiftBaseCell.cs |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/Main/System/HeroUI/GiftBaseCell.cs b/Main/System/HeroUI/GiftBaseCell.cs
index cf7b6cc..31b83cf 100644
--- a/Main/System/HeroUI/GiftBaseCell.cs
+++ b/Main/System/HeroUI/GiftBaseCell.cs
@@ -1,6 +1,7 @@
 锘縰sing UnityEngine;
 using UnityEngine.UI;
 using UnityEngine.Events;
+using Cysharp.Threading.Tasks;
 
 public class GiftBaseCell : MonoBehaviour
 {
@@ -175,18 +176,18 @@
             }
 
 
-            UIManager.Instance.OpenWindow<SmallTipWin>();
+            UIManager.Instance.OpenWindowAsync<SmallTipWin>().Forget();
 
         }
         else if (giftID == 0)
         {
             SmallTipWin.showText = Language.Get("HeroGift1");
-            UIManager.Instance.OpenWindow<SmallTipWin>();
+            UIManager.Instance.OpenWindowAsync<SmallTipWin>().Forget();
         }
         else if (giftID == -1)
         { 
             SmallTipWin.showText = Language.Get("HeroGift2", HeroAwakeConfig.GetAwakeLVByUnLockGiftIndex(heroID, index));
-            UIManager.Instance.OpenWindow<SmallTipWin>();
+            UIManager.Instance.OpenWindowAsync<SmallTipWin>().Forget();
         }
     }
 
@@ -242,7 +243,7 @@
     }
 
     GameObject cellContainer;
-    protected void LoadPrefab()
+    protected async UniTask LoadPrefab()
     {
         if (cellContainer != null)
             return;
@@ -255,7 +256,16 @@
         }
         if (cellContainer == null)
         {
-            cellContainer = UIUtility.CreateWidget("GiftBaseCell", "Container_GiftCell");
+            cellContainer = await UIUtility.CreateWidget("GiftBaseCell", "Container_GiftCell");
+            
+            if (this == null)
+            {
+                if (null != cellContainer)
+                {
+                    GameObject.DestroyImmediate(cellContainer);
+                }
+                return;
+            }
 
             if (cellContainer != null)
             {

--
Gitblit v1.8.0