im making a mesh for my map thats procedurally generated and im trying to colour all the top faces green. ive created a new list and i add the colour to that and then i set the list.ToArray() to the mesh colours like done on the Unity Documentation. Im not sure why it isnt working. Both lists are the same length and I use this code to add coloour
verts.Add(currentPos + new Vector3(0, 0, 1));
verts.Add(currentPos + new Vector3(1, 0, 0));
verts.Add(currentPos + new Vector3(1, 0, 1));
coloursVerts.Add(Color.green);
coloursVerts.Add(Color.green);
coloursVerts.Add(Color.green);
coloursVerts.Add(Color.green);```
```newChunk.GetComponent<MeshFilter>().mesh.colors = coloursVerts.ToArray();```
any help would be appreciated thanks