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/HeroHeadBaseCell.cs | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/Main/System/HeroUI/HeroHeadBaseCell.cs b/Main/System/HeroUI/HeroHeadBaseCell.cs
index 2104662..4422cf0 100644
--- a/Main/System/HeroUI/HeroHeadBaseCell.cs
+++ b/Main/System/HeroUI/HeroHeadBaseCell.cs
@@ -156,16 +156,7 @@
// {
// skinID = heroConfig.SkinIDList[0];
// }
- var sprite = UILoader.LoadSprite("HeroHead", HeroSkinConfig.Get(skinID).SquareIcon);
- if (sprite == null)
- {
- // 鍐呯綉鏈厤缃椂
- heroIcon.SetSprite("herohead_default");
- }
- else
- {
- heroIcon.overrideSprite = sprite;
- }
+ UILoader.LoadSprite("HeroHead", HeroSkinConfig.Get(skinID).SquareIcon, heroIcon, "herohead_default").Forget();
if (star == 0)
@@ -261,7 +252,7 @@
}
GameObject cellContainer;
- protected void LoadPrefab()
+ protected async UniTask LoadPrefab()
{
if (cellContainer != null)
return;
@@ -274,7 +265,16 @@
}
if (cellContainer == null)
{
- cellContainer = UIUtility.CreateWidget("HeroHeadBaseCell", "Container_HeadCell");
+ cellContainer = await UIUtility.CreateWidget("HeroHeadBaseCell", "Container_HeadCell");
+
+ if (this == null)
+ {
+ if (cellContainer != null)
+ {
+ DestroyImmediate(cellContainer);
+ return;
+ }
+ }
if (cellContainer != null)
{
--
Gitblit v1.8.0