- Home /
Unity 5 - submeshes don't work as before
In my project I'm using submeshes to place multiple materials on my mesh. In Unity 5 they don't seem to work as before. I can generate the mesh without problems but if i want to apply the meshcollider to it, I'm getting this error:
"Failed getting triagles. Submesh 1 has no indices. UnityEngine.MeshCollider:set_sharedMesh(Mesh)"
In Unity 4.6 this wasn't the case. Also it still works fine if you don't use submeshes. Any idea how to fix this?
Answer by Arkade · Mar 30, 2015 at 09:16 PM
Two potentially useful things for you.
One, see this question Unity5 - "Failed getting triangles".
Two, a workaround might be to, for each material on the non-Collider Mesh you're not otherwise generating a mesh for, set a trivial submesh. (e.g. see post 655 in the TerraVol thread).
HTH.