Need to rescan PointGraph after assembly reload

Hi,

First, thanks for making such a great tool. :slight_smile:

I’ve noticed that in the editor, when the assembly reloads (for example when editing a script), the PointGraph connections disappeared from the scene view.
I tried the same repro-steps with the GridGraph and the connections remained.

It doesn’t bother me in play mode so much as I just need to set the ScanOnAwake flag to true (or generate the cache) but I wanted the graph to build as the level designer was adding more graph points.
At the moment, when I load the scene, the graph that was previously scanned doesn’t appear.

I’m on version 3.8.8.1 (free) of the A* Pathfinding Project and 5.5.0f3 of Unity.

Am I missing something to keep the PointGraph connections through assembly reload or when loading a scene?

Thanks.

Hi

That is because the graphs are not serialized with the Unity level (usually you do not want to store it anyway and the size of the data can be quite significant for larger graphs). You can quickly recalculate the graph using ctrl + alt + s (or cmd + alt + s on maxOS).

Thanks for the quick answer. I’ll regenerate it when the editor scene loads with some script. :slight_smile:

Is that true for every type of graph (not being serialized with the Unity levels)? The GridGraph seemed to be ok.

Yes, it is. The grid graph does sometimes scan itself automatically if the last scan was faster than 100 ms or something like that, but I am going to remove that because it has caused a lot of confusion.