- Home /
Does Mesh.CombineMeshes autosplit meshes over 64k triangles in Unity 5.x?
Does Mesh.CombineMeshes autosplit meshes over 64k triangles in Unity 5.x? It doesnt seems to throw any error?
It hasnt worked for me. It's a little disappointing that this $$anonymous$$eshCombiner has been broken since 2011 yet Unity insist on keeping this method in their new releases. A ton of people have run into issues and havent solved them and Unity continues to do nothing about it.
Answer by Bunny83 · Sep 20, 2016 at 02:11 PM
Of course it does not, how should it even do that? CombineMeshes is a method of the Mesh class. The content of that Mesh will be replaced with the combined result of the meshes you pass to the function. From the usage alone you can derived that it's not possible for the mesthod to "split" the result into several meshes.
Splitting a model into several meshes always requires additional MeshRenderer components and therefore multiple GameObjects. CombineMeshes does exactly what is specified: It combines several meshes into one mesh. When you pass wrong input data (meshes which combined are too large for a single Mesh) you can't expect it to work properly.
Yes, a warning or error message would be nice, but is not a requirement. There are other cases where the same thing happens. When you add a very small float value to a very large one, so the difference surpasses the significant figure count, nothing will be added and the value will be the same after the addition. You don't get a warning or an error. You have to take care of your input parameters.