修复bug

This commit is contained in:
shenjianxing 2025-04-01 08:55:49 +08:00
parent 042d435159
commit 63e741e6fd

View File

@ -433,7 +433,7 @@ namespace QFramework.Example
{ {
obj.SetActive(isOn); obj.SetActive(isOn);
}); });
var iconImg = BodyItem.transform.Find("Icon").GetComponent<Image>(); var iconImg = bodyItem.transform.Find("Icon").GetComponent<Image>();
LoadIcon(body.Icon, body, iconImg); LoadIcon(body.Icon, body, iconImg);
} }
} }
@ -484,6 +484,7 @@ namespace QFramework.Example
{ {
if (string.IsNullOrEmpty(body.Icon) == false) if (string.IsNullOrEmpty(body.Icon) == false)
{ {
iconImg.gameObject.name = body.Icon;
var localImageUrl = Global.imagePath + body.Icon; var localImageUrl = Global.imagePath + body.Icon;
loader.Add2Load(localImageUrl.ToNetImageResName(), loader.Add2Load(localImageUrl.ToNetImageResName(),
(bool success, IRes res) => (bool success, IRes res) =>