Hello,
if I have for example the default Unity cube, how can I add vertices to that mesh? Let’s say a vertex in the middle of each side of the cube, and add them so they are really a part of the cube mesh.
Thanks
Hello,
if I have for example the default Unity cube, how can I add vertices to that mesh? Let’s say a vertex in the middle of each side of the cube, and add them so they are really a part of the cube mesh.
Thanks
I suggest reading the Scripting API for the Mesh class.
Basically, a mesh consists of at least two things: vertices and triangles. So in order to add a new vertex, you would add it to the vertex array and then reassign all vertices to triangles.