//动态更换精灵图片
m_headimage.overrideSprite = Resources.Load("texture/"+info.HeadPortrait,typeof(Sprite)) as Sprite;
此处:info.HeadPortrait 为字符串类型,精灵图片名字。
2024-04-09 14:14:29
//动态更换精灵图片
m_headimage.overrideSprite = Resources.Load("texture/"+info.HeadPortrait,typeof(Sprite)) as Sprite;
此处:info.HeadPortrait 为字符串类型,精灵图片名字。