您的位置:首页 > 产品设计 > UI/UE

动态修改ui2dsprite的图片

2015-08-25 11:53 375 查看
最好还是使用uispirte

Texture2D tx = Resources.Load ("background/" + xxx) as Texture2D;

if (tx != null)

{

sprite.sprite2D = Sprite.Create(tx, new Rect(0, 0, tx.width, tx.height), Vector2.zero);

sprite.MakePixelPerfect();

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: