今天发现游戏图片边缘一直有一条线,将png图片边缘擦了又擦也还是有,不过只有UITexture才有线,而Unity的Sprite却没有。显示效果如下:

NGUI UITexture图片边缘会有一条线

后来改了图片属性,将Wrap Mode改为Clamp搞定了!

NGUI UITexture图片边缘会有一条线

Texture.wrapMode 循环模式

var wrapMode : TextureWrapMode

Wrap mode (Repeat or Clamp) of the texture.

循环模式(重复或强制拉伸)

Set the texture to clamp at the borders to avoid warping artifacts with TextureWrapMode.Clamp . Or tile the texture with TextureWrapMode.Repeat

在贴图边界以设置贴图的重复模式的方式避免不真实的情况,使用强制贴图边界拉伸 TextureWrapMode.Clamp 或者贴图重复平铺 TextureWrapMode.Repeat


相关文章:

  • 2022-12-23
  • 2022-01-19
  • 2021-04-17
  • 2021-04-24
  • 2022-12-23
  • 2022-12-23
  • 2022-01-19
猜你喜欢
  • 2021-05-30
  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案