Automatically Assigning NavMesh Modifier Classes Based on Object Type

How to automatically apply NavMesh Modifier classes based on object type?

I would like to know if it’s possible to automatically assign specific NavMesh Modifier classes to objects in my scene, based on their type (e.g. road, sidewalk, ground). Each modifier class has a cost parameter that affects the pathfinding of characters - I want characters to prefer paths with lower cost modifiers.

For example, I would like sidewalks to have a modifier with cost 1, roads to have a modifier with cost 99999, and ground to have a modifier with cost 100. This would make characters try to path along the lowest cost areas.

Is there a way to automate this process of assigning the right NavMesh Modifier class to different types of objects in my scene? I’m hoping to find a solution that doesn’t require manually placing each modifier individually.

Please let me know if you have any suggestions or information on how to approach this.