The basics of creating a mesh with code in Unity3D.
The basics of mesh generation in Unity3D
The code for creating basic meshes in Unity3D