入门客AI创业平台(我带你入门,你带我飞行)
博文笔记

NGUI UITexture图片边缘会有一条线

创建时间:2018-03-23 投稿人: 浏览次数:109

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


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


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


声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。