How to make a mesh out of vertices

//How can I generate a mesh from an array of vertices? So I have perhaps 8 points in an //array - how do I make them into a mesh?

//This first bit is answered.

EDIT: Actually, what I really want to ask is this. What is the triangle int class looking for? Is the int specific points (so x, y, z, components) or is it just terms of an array? - Solved, but new question posted. Edited this way too much.

Just having 8 vertices in a mesh isn’t going to display anything, you need define faces (triangles) referring back to your array of vertices. If your mesh is going to have a texture material you would need to add uv coordinates as well. If you want lighting to react properly don’t forget your normals or at least call RecalculateNormals.

Read below reference, you will find all what you looking for:

http://unity3d.com/support/documentation/ScriptReference/Mesh.html

Right, for anyone who stumbles across this, here is my procedure:

  1. Get vertices
  2. Put them in an array (but should already happen in 1!)
  3. Make a mesh, using the mesh class (found in earlier answer).
    If anyone wants more detail, comment, or just check the docs.