#Failed setting triangles

1 messages · Page 1 of 1 (latest)

empty saffron
#

I know why Unity gives this error with Mesh.SetTriangles(), i just can't try..catch it.
try { mesh.SetVertices(vertices); mesh.SetUVs(uvChannel, uv); mesh.SetTriangles(tri, subMesh); // <- Error here mesh.RecalculateBounds(); mesh.RecalculateNormals(); } catch { return false; // THIS never triggers }

sterile flicker
#

do you understand what the error is saying

empty saffron
#

It starts giving those errors when i put more skewed parameters to my mesh, they are fine in more valid range of scaling.

sterile flicker
#

that doesn't answer my question

empty saffron
#

well, it does say out of bounds vertices something?

sterile flicker
#

Yeah, do you know what that actually means

#

im not trying to shame just narrow down what specifically you need help with

empty saffron
#

I'm not trying to fix my mesh, only trying to catch that error

#

So how can i do that?

sterile flicker
#

you'd have to re-create the validation

empty saffron
#

It's 3rd party long library almost for triangulating polygons, it's doing things i don't even understand anyway xD

#

Jigsaw puzzles when put to extreme may start making holes inside, i have almost no way to detect such a thing

sterile flicker
#

detecting holes is one thing, detecting what that error is telling you about is another