参考文档:unity 图片旋转(180度翻转)_unity翻转图片-优快云博客
Texture2D Rotate180(Texture2D tex)
{
int width = tex.width;
int height = tex.height;
Texture2D newTexture = new Texture2D(width, height);
for (int i = 0; i < width; i++)
{
for (int j = 0; j < height; j++)
{
Color color = tex.GetPixel(i, j);
newTexture.SetPixel(width - i, height - j, color);
}
}
newTexture.Apply();
return newTexture;
}
其他文档:

最低0.47元/天 解锁文章
4404

被折叠的 条评论
为什么被折叠?



