I have a mesh that has 10 submeshes, I wonder how I can change the color of of these submeshes to a different color (e.g submesh1 will have a red color, submesh2 will have a blue color,…etc). Any advise please?
UPDATE:
This is how I’m getting my mesh which has 10 submeshes:
SkinnedMeshRenderer smr = gameobject1.GetComponent();
Mesh main_mesh = smr.sharedMesh;