A* Pathfinding Project

[Unity] Having multiple levels with graph cache


I have multiple levels using a recast graph however they all seem to share the same cache (i.e the last level that generated a graph will be used for all levels instead of each having their own unique one).

I tried saving to a file but then I got a bunch of “models not set to readable”-esque errors.

It’s important that these graphs load when the level loads.



The cache is just a file. If you set the cache file’s field to None then the next time you generate the cache it will create a new file instead of overwriting the old one. This is equivalent to saving to a file.