Quick answer: Unity MeshCollider assigned a runtime mesh shows no collisions? Cooking Options need 'Use Fast Midphase' and 'Cook for Faster Simulation' - or set the mesh to readable.

Procedural mesh assigned to a MeshCollider at runtime. Raycasts pass through.

Set Cooking Options

On the MeshCollider, enable Cook For Faster Simulation and Use Fast Midphase. Required for runtime-assigned meshes; otherwise PhysX silently rejects.

Mark mesh readable

Source mesh import > Read/Write Enabled. The collider needs CPU-side access to cook; GPU-only meshes are invisible to the cooker.

Force re-assignment

col.sharedMesh = null;
col.sharedMesh = mesh;

The null assignment invalidates the cached cook; re-assignment triggers a fresh bake.

“Mesh colliders are cooked, not just referenced. The cooker has prerequisites.”

For procedurally generated terrain, batch the mesh updates - cooking is expensive enough that 60Hz updates will tank your frame rate.