// Update is called once per frame void Update() { //to texture vertices int total = GenerateController.sphere_m * GenerateController.sphere_n; int index = 0; for (int i = 0; i < GenerateController.sphere_m; i++) { for (int j = 0; j < GenerateController.sphere_n; j++) { Vector3 _p = P(UV [i, j].x, UV [i, j].y); GenerateController.GetSphere(i, j).position = _p; } } verts.Clear(); for (int i = 0; i < GenerateController.sphere_m; i++) { for (int j = 0; j < GenerateController.sphere_n; j++) { verts.Add(GenerateController.GetSphere(i, j).localPosition); // MeshGeneration.mesh.vertices [index++] = GenerateController.GetSphere (i, j).position; } } MeshGeneration.mesh.SetVertices(verts); index = 0; }