Implenting pathing on dynamic world

Hey, just bought A Pathfinding Project Pro* , I need help with implanting it into my game.

I use Tiles which placed in line for player to move along.

As player move forward, new tiles placed in front of him, tiles behind eventually removed, and when he move far enough, all existing tiles move back to axis origins.

When player reach new tile, he stop moving and start fighting on a tile. That’s where i need Pathing.

There are player’s and enemy’s armies. Tile has placed spawn points and combat points. I want units to move to combat points and start shooting on arrival.

I feel like best solution for my case will be Layered Grid Graph. I tried to use it.

I understand how to setup everything in case where tiles are preplaced. I also tried rescanning everything on tile placement, unfortunately lag spike is too bug to do it, lags are also presented when I tried to use ScanAsync.

Next thing I try is to use caching options. Few issues here:

  • If I place cached graph it does appear in inspector, but nothing happens.
  • If I use scan command, graph appear in game, but with lag just as strong as if I didn’t use cached version, what’s the point then?
  • I also don’t see easy way to get reference to placed graph, so I could move it boundries to respective Tile. I assume I can get it by - AstarPath.active.graphs[AstarPath.active.graphs.Length - 1];
    is this the best way and is it always accessable after DeserializeGraphsAdditive ?

When I will be able to place Tile paths on scene, next question will rise – how would I update pathing for destructible objects and how will I know path to point is available/blocked?

Right now Im thinking about using UpdateGraphs with boundries provided by destructible object, so it will update grid only around destroyed object. Is this approach correct for my case?

Then come the question of combat points. They are presented as transforms on scene. Is there a way to see, if transform can be reached from certain point? Ive seen that agent try to get to closest point from original destination, so i dont understand how to see if point is reachable.

Ex – after destroying bridge or if there is something blocking unit to reach rooftop of building combat point will stop being available for units.