Hi. Im currently trying to read vertex colors from a mesh exported from blender to unity .
This is a screenshot of the mesh with standrad vertex colors material shader.
As you can see, there are only 3 colors - red, white and blue.
My goal is to get info of which vertices have certain vertex color using “Mesh.colors” array
but the problem is it doesnt read mesh’s vertex colors well!
there are total 2891 vertices and vertex colors in this mesh, but unity says there are only two white vertex colors in this mesh! I tried both mesh.colors and mesh.colors32 and it was same result.
then I tried to change all vertices color of mesh with redfor a test to check if I did any thing wrong, with codes below.
List<Color> w_colors=new List<Color>();
w_colors.AddRange(Enumerable.Repeat(Color.red,mesh.colors.Length));
mesh.SetColors(w_colors);
And then I got count of all vertices’ colors with red(2891) in both scene view and console
Is there anything I did wrong?