How to change Vertex Color.

Hello to everyone, I’ve a custom mesh created vertex by vertex. I want to color the triangles in green or red… I read this link Unity - Scripting API: Mesh.colors, but it dosen’t works…

I just create my mesh using:

mPlatformMesh.Clear();
		mPlatformMesh.vertices 	= mVertices;
		mPlatformMesh.triangles = mTriangles;
		mPlatformMesh.colors    = mColors;
		mPlatformMesh.uv 		= mUVs;
		mPlatformMesh.normals   = mNormals;

But all i can see is a Pink Mesh! All arrays are filled right, but i can’t see anything… Any Idea?

what shader are you using to draw this mesh. Looks like the shader is either not supported or is just wrong.

Vertex colors won’t do anything unless you use a shader that supports vertex colors.

–Eric