Why Astar Path is so slow when selected

I’ve been pretty annoyed with Astar Path forcing Unity to a crawl once selected, making certain things almost unusable. After a lot of experimentation I found the culprit.

For the impatient: Go to the Astar settings and turn on the experimental undo. Blam, it’s fast again, as it should be.

For the rest: In the SaveGraphsAndUndo (around line 1852) there’s a check for enableUndo. If it’s off, it will set AStar to dirty, which apparently forces a redraw (including trying to SaveGraphsAndUndo again). Every frame. As long as it’s selected. So there. Since I don’t really care about the undo, I take the !enableUndo part out there and turn it off again in the settings.

PS: Roughly how long until we can expect version 3.2?

Hi

Sorry about that bug. This is indirectly fixed in 3.2 since the option for disabling Undo is removed (led to simpler code, and it is quite stable now).

I hope to release version 3.2 before christmas.