Planar mesh with collider at runtime how?

I am trying to create a mesh with a mesh collider. It is a planar mesh and i am setting up a Mesh with 4 vertices at runtime and defining its triangles as well. Then I am creating a GameObject with new keyword and i am adding a meshCollider to gameObject using game object`s addComponent function and then i am setting sharedMesh of collider to the mesh that i have created. However, I am not getting any collision. Can the reason be that i am not using MeshFilter? Thanks to all

I would use box collider with very thin y dimension

the object you add the collider to does not move, right?
if it does, the mesh must be convex and so must the mesh collider be

No it does not move. I am creating it, checking collision (the thing i can not do now:)) and then i am creating another collision planar mesh by changing the vertices of mesh.

why do you suggest box collider instead of MeshCollider? Do you think the reason can be that mesh collider can not handle collision under those circumtances?

Zero is actually fine. I use that.

Box Colliders are faster than mesh colliders and they work from both sides.