using UnityEngine; public class flipMesh : MonoBehaviour { // Use this for initialization void Start () { Mesh mesh = GetComponent().mesh; Vector2[] uv = mesh.uv; int szV = uv.Length; Vector2[] newUv = new Vector2[szV]; for (int j = 0; j < szV; j++) { newUv[j] = new Vector2(uv[szV - j - 1].x, uv[j].y); } mesh.uv = newUv; } }
沒有留言:
張貼留言