hch
2025-11-21 eb27e5fd31f73b998a4bbd85511a31e40b8c61b7
Main/System/HeroUI/HeroBestWin.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
using Cysharp.Threading.Tasks;
using UnityEngine;
using UnityEngine.UI;
@@ -159,8 +160,31 @@
        RefreshFetter();
        RefreshGift();
        RefreshAwake();
        ForceRefreshLayout();
    }
    /// <summary>
    /// 强制刷新Layout,解决嵌套Layout和ContentSizeFitter的重叠问题
    /// </summary>
    async UniTask ForceRefreshLayout()
    {
        await UniTask.DelayFrame(2);
        // 刷新所有Layout组件
        var layouts = allAttrScroll.GetComponentsInChildren<LayoutGroup>(true);
        foreach (var layout in layouts)
        {
            LayoutRebuilder.ForceRebuildLayoutImmediate(layout.GetComponent<RectTransform>());
        }
        await UniTask.DelayFrame(2);
        // 刷新所有Layout组件
        foreach (var layout in layouts)
        {
            LayoutRebuilder.ForceRebuildLayoutImmediate(layout.GetComponent<RectTransform>());
        }
    }
    void RefreshConn()
@@ -257,6 +281,8 @@
            attrPanel.localPosition = foldPos.localPosition;
            // //禁止attrScroll滚动
            // allAttrScroll.enabled = false;
            var _rect = allAttrScroll.GetComponent<RectTransform>();
            _rect.sizeDelta = new Vector2(_rect.rect.width, 197);
        }
        else
@@ -265,6 +291,8 @@
            unfoldImg.SetActive(true);
            attrPanel.localPosition = unfoldPos.localPosition;
            // allAttrScroll.enabled = true;
            var _rect = allAttrScroll.GetComponent<RectTransform>();
            _rect.sizeDelta = new Vector2(_rect.rect.width, 933);
        }
    }
@@ -452,7 +480,16 @@
            else if (type == 2)
            {
                var skill = SkillConfig.Get(config.SkillID);
                awakeStr = Language.Get("L1039", skill.SkillName) + skill.Description;
                if (skill != null)
                {
                    awakeStr = Language.Get("L1039", skill.SkillName) + skill.Description;
                    awakeStr = Language.Get("L1039", skill.SkillName) + skill.Description;
                }
                else
                {
                    Debug.LogError($"heroId:{HeroUIManager.Instance.selectForPreviewHeroID} 觉醒技能ID:{config.SkillID} 配置错误技能不存在");
                }
            }
            else
            {