How to add colliders to roads?

I have some roads, and I would like to add colliders on it to verify if the car hits the limit of the roads, and use some ray sensors too.

What is the best way to do this?

I’m using RoadArchitect.


I’ve never used RoadArchitect but just looking at the project on GitHub suggests that the roads are procedurally generated. You can easily steal the mesh for the road and use it in a mesh collider (ideal if precision is more important than performance) or attempt to modify it to have it generate cube colliders along the road.