Weird collision bug (87150)

Hi, I have a weird bug,

I create a mesh dynamically during runtime, and I update the MeshCollider “sharedMesh” every fixed moment in order to update the collider.

As my player start touching the mesh, nothing happens, I tried to press isTrigger as true and it suddenly work! also as I pressed it again (making it false), and it kept working! and collided with the mesh collider!

What might cause this problem? any ideas?

I fixed it, the problem was that I updated the collider in every frame, re-update it only in the end of the frame, or after a fixed amount of time, this is a buggy component.