How Instantiate a gameobject and creating a mesh within it?

I’m thoroughly stumped here.

I’ve been able to make a mesh prcoedurally on a single GameObject, but what I need is multiple meshes created from one script.

And there is a limitation of one mesh per GameObject. So… I need to instantiate one and make a mesh on the intantiated one.

So I make a script that has mesh, meshfilter, meshrenderer, etc, attach that to a gameobject, instantiate.
It makes the copies, I see the copies have all those components… but I can’t acutally access and modify them. I can’t get the triangles, verts, color set on the cloned prefabs.

I tried two different ways I would think would work by the docs, but they don’t.

http://pastebin.com/m57bd5035 This one says it doesn’t have mesh, meshfilter on the associated GameObject with the 2nd script.
http://pastebin.com/m744685d5" ‘UnityEngine.GameObject’ does not contain a definition for `meshRenderer’" on the 2nd script.

Nevermind… Got this one resolved too.
Was doing mesh wrong, and namespacing wrong. Also needed to add the components on Awake().