- Home /
try{}catch{} not catching Mesh.vertices is too small.
I have error showing up in the console
Mesh.vertices is too small. The supplied vertex array has less vertices than are referenced by the triangles array. UnityEngine.Mesh:set_vertices(Vector3[])
I would like get some more information about it but I can not catch this exception. try{ mesh.vertices = newVerts; mesh.triangles = newTris; mesh.uv = newUVs; }
catch(UnityException){
Debug.Log ("vert error: "+ name);
throw;
}
catch {
Debug.Log ("vert error: "+ name);
throw;
}
I can write my own code to check explicitly for the exception, but I would like to understand how to catch exceptions generated by Unity.
Comment
I am having this same problem and for some reason am having a great deal of trouble finding an answer.