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/HeroPosWin.cs |   46 ++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 38 insertions(+), 8 deletions(-)

diff --git a/Main/System/HeroUI/HeroPosWin.cs b/Main/System/HeroUI/HeroPosWin.cs
index c79fbf2..7bb4492 100644
--- a/Main/System/HeroUI/HeroPosWin.cs
+++ b/Main/System/HeroUI/HeroPosWin.cs
@@ -83,21 +83,32 @@
         countryOnBtn.AddListener(() =>
         {
             HeroUIManager.Instance.isCustonHeroFormation = false;
-            UIManager.Instance.OpenWindow<HeroFormationWin>();
+            UIManager.Instance.OpenWindowAsync<HeroFormationWin>().Forget();
         });
 
         lineupRecommendBtn.AddListener(() =>
         {
-            UIManager.Instance.OpenWindow<LineupRecommendWin>();
+            UIManager.Instance.OpenWindowAsync<LineupRecommendWin>().Forget();
         });
 
         m_IsToggleOn = LocalSave.GetBool("ShowConn" + PlayerDatas.Instance.baseData.PlayerID, false);
-        fiterManager = HeroSelectBehaviour.Create(heroSelectBehaviour);
 
-        var presetObj = UIUtility.CreateWidget("FuncPresetChooseCells", "FuncPresetChooseCells");
-        presetObj.transform.SetParentEx(caseesObj, Vector3.zero, Quaternion.identity, Vector3.one);
-        presetChooseCells = presetObj.GetComponent<FuncPresetChooseCells>();
-        presetChooseCells.ChangeAlignment(TextAnchor.MiddleCenter);
+
+        UIUtility.CreateWidget("FuncPresetChooseCells", "FuncPresetChooseCells").ContinueWith(presetObj =>
+        {
+            if (this == null)
+            {
+                if (presetObj != null)
+                {
+                    GameObject.DestroyImmediate(presetObj);
+                }
+                return;
+            }
+            presetObj.transform.SetParentEx(caseesObj, Vector3.zero, Quaternion.identity, Vector3.one);
+            presetChooseCells = presetObj.GetComponent<FuncPresetChooseCells>();
+            presetChooseCells.ChangeAlignment(TextAnchor.MiddleCenter);
+        }).Forget();
+
 
         funPresetBtn.AddListener(()=>
         {
@@ -166,7 +177,26 @@
         RefreshEmptyTip();
 
         showConnTipToggleBtn.isOn = isToggleOn;
-        fiterManager.Display(0, SelectJobCountry);
+        if (null != fiterManager)
+        {
+            fiterManager.Display(0, SelectJobCountry);
+        }
+        else
+        {
+            HeroSelectBehaviour.Create(heroSelectBehaviour).ContinueWith(fmgr =>
+            {
+                if (this == null)
+                {
+                    if (fmgr != null)
+                    {
+                        GameObject.DestroyImmediate(fmgr.gameObject);
+                    }
+                    return;
+                }
+                fiterManager = fmgr;
+                fiterManager.Display(0, SelectJobCountry);
+            }).Forget();   
+        }
         fightPowerText.text = UIHelper.ReplaceLargeArtNum(FightPowerManager.Instance.GetTeamFightPower(HeroUIManager.Instance.selectTeamType, true));
 
         presetChooseCells.Display((int)BattlePreSetType.Story, (int)FuncPresetType.Team);

--
Gitblit v1.8.0