- A* Pro version: 5.3.3
- Unity version: 6000.0.37f1
Hi!
In my project I am dividing my map into chunks that I can load or unload. Whether they will be prefabs or scenes has not been decided yet and my discoveries with Astar will dictate that decision. Basically, I want to know what is the best way to use Astar with a dynamic map like this, where chunks are loaded/unloaded based on the player’s position. They are not procedural, they are just culled out of the scene so that we keep memory footprint low.
Studying the demos and the documentation, I thought of the following options:
A) Like in the procedural demo, have AStar following the player position. This feels unnecessary since the map is not dynamically generated, it is static, it’s just unloading and loading.
B) Have a very big width (nodes) x height (nodes) graph that encompasses the entire map, and, when a new chunk is loaded/unloaded, I ask AStar to scan that region only (not sure if that’s supported).
C) Have a single graph for each region, whether that is grid, recast, etc…
My question is mainly regarding ease of use and performance, because the game is for mobile. I would like to avoid updating the graph as much as possible, but would also need to know if having a very big graph puts a strain in performance.
If you have any other suggestion as well, please let me know!
Thank you very much!