Street constrain

Hi guys, I post the question here but I don’t know if it can be solved using a script.
I have a game based on a real city, now I need to move my player but only on the streets (1 big object, plane). So I need a constrain in the street (so a special collider ). Is it possible? I don’t want to design a path by myself but something linked to the street because I have a lot of scenes with a lot of cities.
Any suggests?

Thanks so much!

if you are using the navmesh system, just make it so only the streets are a walkable area. Or just start dropping invisible block colliders around the edges of the street.,

I don’t know how complicated you want to get with your street following behavior, but there are at least two traffic management systems in the asset store / forums. You could look them up and see what their approach is.

I used navmesh in the past to move cars or something other, but I don’t know how to use it as a constrain for my player. In the navigation menu I set the terrain as not walkable and the streets as walkable and I press bake. But which kind of script I need for my player?