Unity NGUI UISprite 图集替换
来源:互联网 发布:ipad直播软件 编辑:程序博客网 时间:2024/05/21 00:18
public static bool ChangeAtlas(this UISprite ui, string atlaspath)
{
if (ui == null || string.IsNullOrEmpty(atlaspath))
{
return false;
}
if (ui.atlas == null || ui.atlas.name != atlaspath)
{
UIAtlas ua = Resources.Load (atlaspath, typeof(UIAtlas)) as UIAtlas;
if (ua != null)
{
ua.name = atlaspath;
ui.atlas = ua;
return true;
}
else
{
return false;
}
}
else
{
return true;
}
}
{
if (ui == null || string.IsNullOrEmpty(atlaspath))
{
return false;
}
if (ui.atlas == null || ui.atlas.name != atlaspath)
{
UIAtlas ua = Resources.Load (atlaspath, typeof(UIAtlas)) as UIAtlas;
if (ua != null)
{
ua.name = atlaspath;
ui.atlas = ua;
return true;
}
else
{
return false;
}
}
else
{
return true;
}
}
阅读全文
0 0
- Unity NGUI UISprite 图集替换
- unity开发 --------- NGUI (UISprite)
- Unity NGUI UIBotton/UISprite
- Unity NGUI UISprite
- (NGUI)UISprite 切换图集
- (NGUI)UISprite 切换图集
- NGUI -- UISprite
- unity游戏开发之NGUI的UISprite染色
- Unity NGUI UITexture 图片替换
- NGUI的流光shader解决方案(一)(支持UITexture和使用图集的UISprite)
- NGUI的流光shader解决方案(二)(支持UITexture和使用图集的UISprite)
- 【Unity3D】【NGUI】UISprite
- NGUI-UISprite
- NGUI之UISprite
- NGUI之UISprite
- NGUI实现UISprite拼接
- NGUI控件说明(中文) UISprite
- NGUI所见即所得之UISprite,UILabel
- 从Matlab .fig文件中读取数据,并重新绘图
- Flex与php通信
- php配置 mysqli扩展
- 最长回文串的四种解法
- 利用Flex实现P2P文件传送
- Unity NGUI UISprite 图集替换
- gulp常用API
- 一个bug引发的linux smp 血案(二)
- amfphp 数据乱码解决
- 鼠标经过效果
- 使用js动态的修改div和span标记中…
- FMS服务器端和客户端互相调用
- php发送邮件
- Android app更新方案