Better Workflow for Organizing multiple graphs

I’m making a 2D pixel art game with multiple maps in the same scene (probably above 40) with a grid graph for each for cutscene and AI navigation.

I would greatly appreciate a better mangement UI for graphs or the ability to re-order them at least. More preferable would be the ability attach a single graph script (GridGraph.cs or the like) per map parent GameObject (thus splitting the graph logic out from the core script somewhat) and have those automatically get picked up by the core AstarPath script, since I’m only allowed one of those per scene.

As it is, managing multiple maps is pretty rough above about 5 or 10, so thanks for any consideration here.

If there’s some feature I missed in the documentation that make multiple maps more manageable, please let me know and sorry if I did. And also, thanks for the great tool!

Hi

It is possible to re-order them if you check the A* Inspector -> Settings -> Prioritize Graphs checkbox. I’d suggest unchecking it after you are done with the reordering though since you probably don’t want that feature enabled.
You can also rename graphs by clicking the small pen icon to the right of the graphs’ names.

Also. Is there any reason you cannot just have one big graph? That might be easier. You might waste some memory on the nodes in between the levels, but I don’t think it will be significant unless your levels are far away from each other.

I considered one big graph, but I don’t have a really clean way to have the A* grid graph ignore all the empty space between levels and make them unwalkable (example: https://i.imgur.com/e3jIcnp.png), which is one of those things I’d want to do just to ensure just on the off chance something goes weird or all those walkable tiles somehow hit performance.

Is there any way around that or should I just not care assuming things are islanded properly? I’m targeting some pretty low-spec platforms and I have 35 NPC agents that could be running at same time (depending on their AI schedules) and I don’t want repaths to be too costly even with the threading.

EDIT: Also, thanks for the Prioritize Graphs note. I wasn’t sure what that box did. That’ll help me get things in order at least.

They won’t really. In fact, having one big graph is better for performance compared to multiple smaller ones in some cases since it can search for the closest node to a point much more quickly.

You can place colliders in between the levels I suppose…