The reason I want to do this is I’m making a simulation with lots of objects, and when the number of objects hits a few thousand, the queue for paths keeps piling up and very few paths get calculated in time.
Any way to solve this?
EDIT: Hmm, seems like the problem wasn’t the actual pathfinding, but just the amount of gameobjects, object pooling helped a lot!
Seems you have found the problem, but I can chime in anyway.
You can precalculate a path and move along it later, the included movement scripts start moving along the path immediately, but you can request a path from any position to any other position at any time. See http://arongranberg.com/astar/docs/calling-pathfinding.php
For performance, make sure multithreading is enabled (A* Inspector -> Settings). Reducing the graph resolution and reducing how often the agents re-plan their path also helps.