How to add a collider to the pipe

I have a pipe and I want to add a collider to it. When player inside of it, he shouldn’t be able to move through the pipe.

The pipe contain mesh collider, but I don’t really understand, how it works. There is no any effect from it.

31892-1.jpg

Add in your object the meshCollider component. In the meshCollider settings in the field “Mesh” shall appear automatically appropriate object of mesh. But if there it is empty, set mesh manually from the list.