Exemplo n.º 1
0
 /// <summary>
 /// 像素坐标转换为UV坐标;
 /// </summary>
 public static Vector2 PixelToUV(this Texture2D texture, Pixel pixel)
 {
     return(TexCoordConvert.ToUV(pixel, texture.width, texture.height));
 }
Exemplo n.º 2
0
 /// <summary>
 /// UV坐标转换为像素坐标;
 /// </summary>
 public static Pixel UVToPixel(this Texture2D texture, Vector2 uv)
 {
     return(TexCoordConvert.ToPixel(uv, texture.width, texture.height));
 }