/// <summary> /// Generates vertex colors for every vertex in the MeshFilter's mesh. /// </summary> private void SetVertexColors() { List <Color> colors = new List <Color>(); foreach (Vector3 p in mesh.mesh.vertices) { //Vector3 pos = p + transform.position; Biome biome = PickBiomeAtPos(p); colors.Add(biome.GetVertexColor()); } mesh.mesh.SetColors(colors); }