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/FuncPreset/FuncPresetWin.cs |   35 +++++++++++++++++++++++++++++------
 1 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/Main/System/FuncPreset/FuncPresetWin.cs b/Main/System/FuncPreset/FuncPresetWin.cs
index fadde68..8cd0ea3 100644
--- a/Main/System/FuncPreset/FuncPresetWin.cs
+++ b/Main/System/FuncPreset/FuncPresetWin.cs
@@ -34,13 +34,36 @@
             }
             globalPresetObj.SetActive(true);
         });
-        var presetObj = UIUtility.CreateWidget("FuncPresetChooseCells", "FuncPresetChooseCells");
-        presetObj.transform.SetParentEx(heroCases, Vector3.zero, Quaternion.identity, Vector3.one);
-        heroPresetCells = presetObj.GetComponent<FuncPresetChooseCells>();
+        UIUtility.CreateWidget("FuncPresetChooseCells", "FuncPresetChooseCells").ContinueWith(presetObj =>
+        {
+            if (this == null || presetObj == null)
+            {
+                if (presetObj != null)
+                {
+                    GameObject.DestroyImmediate(presetObj);
+                }
+                return ;
+            }
 
-        var presetObj1 = UIUtility.CreateWidget("FuncPresetChooseCells", "FuncPresetChooseCells");
-        presetObj1.transform.SetParentEx(minggeCases, Vector3.zero, Quaternion.identity, Vector3.one);
-        minggePresetCells = presetObj1.GetComponent<FuncPresetChooseCells>();
+            presetObj.transform.SetParentEx(heroCases, Vector3.zero, Quaternion.identity, Vector3.one);
+            heroPresetCells = presetObj.GetComponent<FuncPresetChooseCells>();
+        }).Forget();
+
+
+        UIUtility.CreateWidget("FuncPresetChooseCells", "FuncPresetChooseCells").ContinueWith(presetObj1 =>
+        {
+            if (this == null || presetObj1 == null)
+            {
+                if (presetObj1 != null)
+                {
+                    GameObject.DestroyImmediate(presetObj1);
+                }
+                return ;
+            }
+            presetObj1.transform.SetParentEx(minggeCases, Vector3.zero, Quaternion.identity, Vector3.one);
+            minggePresetCells = presetObj1.GetComponent<FuncPresetChooseCells>();
+        }).Forget();
+
     }
 
     protected override void OnPreOpen()

--
Gitblit v1.8.0