yyl
2025-08-11 b2d7bb59dc37c7b350786b076ee2f344b7c8911f
Main/Utility/ComponentExtersion.cs
@@ -294,7 +294,7 @@
        _textImage.sprite = sprite;
    }
    //通过图片名加载
    //通过图片名加载, 如物品表 技能表等,节省在Icon表做多余配置
    public static void SetOrgSprite(this Image _image, string iconName, string folderName = "icon")
    {
        if (_image == null)
@@ -321,4 +321,15 @@
        }
    }
    public static void SetTexture2D(this RawImage _image, string _id)
    {
        if (_image == null)
        {
            return;
        }
        var texture = UILoader.LoadTexture2D(_id);
        _image.texture = texture;
    }
}