Navigation problem

I have learned how to use “Navmesh and Pathfinding”. But there is a problem with it.
I want a function, like Starcraft 2, when a building built, navigation can automatically bypass the generation of dynamic in-game barrier.
who know how to do it?

If you have Unity 4, use a NavMeshObstacle: Unity - Manual: Nav Mesh Obstacle

If you’re still on Unity 3.x, you could attach a NavMeshAgent or kinematic rigidbody to the barrier. Not as efficient or robust, but it’ll work.