public void ColorVertices() { Vector3[] vertices = chunk.Vertices; Color[] colors = new Color[vertices.Length]; for (int i = 0; i < vertices.Length; i++) { colors[i] = GetColor(vertices[i].y); } chunk.ChangeColor(colors); }