Unity has this navigation system that is quite simple to use. You can split up your navigation meshes and use links to connect the various areas and also use obstacles to cut impassable areas into the navigation mesh dynamically. Then just use the navigation mesh agent to find the shortest path between points.
This problem that I am solving right now, is that my machines use the navigation system to traverse the world, but there are areas that are movable just as floor items or something like that, that will affect the navigation mesh and where the agent is allowed to go. Or will pick the agent up and move him somewhere else.
If you look at that image; area “A” is a platform that you can place a machine on, and a machine can navigate on. But when you move the platform, the area becomes disconnected from the rest of the navigation map. And only when it collides with the off mesh links on the other area can you navigate off it or on it again. This is a solution for a navigation system where you can´t have a movable piece of a navigation area, but you cut it out of a bigger area and create a movable area with obstacles that define its borders.
I try to keep my scripts as simple as possible. Utilize the features Unity gives me in a way that is optimal, efficient and scalable.
More of the same tomorrow night.