如果着色器未点亮/透明着色,则不显示NGUI UISprite精灵

时间:2015-03-21 19:22:02

标签: unity3d sprite ngui

我有一个问题是从网格中的地图集显示切片的精灵,着色器使用Unlit / Transparent Colored。 没有显示所有的精灵,因为: enter image description here

当我将着色器更改为Unlit / Transparent Cutout时,可以显示精灵,如下所示: enter image description here

这里有什么问题?我不能使用Unlit / Transparent Cutout,它会使其他布局凌乱。有人可以帮忙吗?

在我的C#脚本中,精灵设置为:

string sprite = sprites[type - 1];
GameObject instance = NGUITools.AddChild(grid, matchItemPrefab) as GameObject;
instance.GetComponent<UISprite>().spriteName = sprite;

0 个答案:

没有答案