hi guys i want to generate a simple mesh at runtime and then use it for my object's mesh renderer but i can not see anything on the screen. i think my problem is with setting triangles. is there anyone that he knows how should i set triangles and what are the different approaches for setting triangles vertecies?
this is my code
Sorry for the late response. I've been swamped and am in the process of transitioning hosting, so my server is down. You can temporarily access the tutorial here: http://dl.dropbox.com/u/680550/MeshTutorial.zip
It's an archive that contains the tutorial PDF and the required files. Sorry for the inconvenience!
answered May 12 '11 at 07:05 PM
I believe you need to fill in your array values first and then finish by assigning mesh.uvs, mesh.uvs, mesh.vertices, mesh.triangles, all at once as in the Mesh documentation examples - http://unity3d.com/support/documentation/ScriptReference/Mesh.html
answered Nov 20 '09 at 08:04 AM
But can you see the new mesh gets applied in the inspector to your transform?
I never really created meshes at runtime but did you try using "m.RecalculateNormals();" instead?
answered Nov 19 '09 at 11:56 PM