0

I have a problem to display the sliced sprite from atlas in the grid, the shader is using Unlit/Transparent Colored. All sprites were not shown, as this: enter image description here

When i changed the shader to Unlit/ Transparent Cutout, the sprites can be shown, as this: enter image description here

What's the problem here? I can't use Unlit/ Transparent Cutout, it will make other layout messy. Can anyone help?

In my C# script, the sprite is set:

string sprite = sprites[type - 1];
GameObject instance = NGUITools.AddChild(grid, matchItemPrefab) as GameObject;
instance.GetComponent<UISprite>().spriteName = sprite;
Rui Huang
  • 382
  • 1
  • 5
  • 18
  • Seems like a depth problem.. Did you check your sprite's depth, the corresponding panel's depth and maybe the render queue of all involved shaders (so, for the icons and background). – d4Rk Jun 06 '15 at 08:56
  • Thanks, it is depth issue! – Rui Huang Jun 08 '15 at 15:43
  • You're welcome. World be nice if you could post your fix as an answer, so that others running in the same issues can find this for help. – d4Rk Jun 08 '15 at 15:49

0 Answers0