Maya's "merge vertices" command doesn't seem to be working.

I have created a large triangular mesh for testing purposes. I made a script that displaces every vertex in the mesh some random amount on its y axis every fixedupdate. I ran it, and I see a lot of blue showing through. When I pause and zoom in, I notice that many of the triangles are only connected at one edge and have a free vertex that can flap up and down without moving its neighbors, and some are completely disconnected from other triangles.
Is this a Maya problem or a Unity import problem and how do I fix something like this so that 100% of the vertices really are merged?

Update : Just tried again in Blender this time, used the “Remove Doubles” command and it didn’t actually remove any- I replaced the mesh with an OBJ exported from Blender, and it behaves the same way (most triangles do not share vertices.)

sounds like a maya problem you can check this after you merge the verts you want just click on one NOT BOX SELECT and move it with the manipulator. If they are not merged increase the threshold by clicking on the box next to the merge vertices name.

I figured it out; the problem had to do with the UV map (needed to be all in one piece) and the normals (needed to be smoothed).
After I did that, the mesh is seamless in Unity.

cool