edit: update to reflect changes made after comments
So I'm trying to build a mesh with code and generate triangles. I've successfully made tris manually, but I'm hoping to utilize this Triangulator script to generate tris for more complex concave/convex shapes.
http://www.unifycommunity.com/wiki/index.php?title=Triangulator Here's the triangulator code in C# -- I'm very unfamiliar with C# so this is pretty confusing to me.
So I use that code:
But that doesn't seem to do much. I assume the .cs script ran through Triangulate with my Vector2 array, but how do I retrieve the results in this .js script?
Any help is greatly appreciated :)
Probably you are trying to attach the Script to a GameObject and therefore made it a MonoBehaviour. I don't know this script, but I guess it's only a Helper class meaning that it doesn't need to be attached to a GameObject and also shouldn't extend MonoBehaviour.
answered Nov 12 '10 at 08:40 AM