yyl
2026-03-26 1ab047b5fdd933c38ba0519ec2e83a44512ea8d7
Main/System/OtherPlayerDetail/OtherNpcHeroCell.cs
@@ -128,6 +128,7 @@
    public async UniTask Init(int heroID, int skinID, int breakLevel = 0, int star = 0, int awakelv = 0, int lv = 0, bool isShowLock = false)
    {
        await LoadPrefab();   //存在被卸载的可能,重新加载
        if (this == null) return;
        var heroConfig = HeroConfig.Get(heroID);
        heroModel.Create(skinID, 1.2f);
@@ -197,19 +198,23 @@
        }
        if (cellContainer == null)
        {
            cellContainer = await UIUtility.CreateWidget("OtherNpcHeroCell", "Container_HeroShow");
            var inst = await UIUtility.CreateWidget("OtherNpcHeroCell", "Container_HeroShow");
            if (this == null)
            {
                if (null != cellContainer)
                {
                    DestroyImmediate(cellContainer);
                }
                if (null != inst) DestroyImmediate(inst);
                return;
            }
            if (cellContainer != null)
            {
                DestroyImmediate(inst);
                return;
            }
            cellContainer = inst;
            if (cellContainer != null)
            {
                cellContainer.transform.SetParentEx(this.transform, Vector3.zero, Quaternion.identity, Vector3.one);
                cellContainer.transform.SetAsFirstSibling();
            }