Framerate drops by more than 50% with A* Pathfinder

Hey everyone. I just bought A* Pro earlier today and have been playing with it for the last 10 hours trying to adapt it to my code base and run well. Unfortunately, anytime I have the A* object with the Pathfinder component enabled in the scene, my framerate drops by over 50%. Also looking at the profiler, it looks like my editor loop takes 70-80% of the resources and is responsible for the spikes in my framerate. Strangely enough, the spikes down 50% FPS only happen when I move, and only when A* is enabled in the scene, sometimes alone, sometimes only when I add a 3 characters using AIPath. I can’t understand the inconsistency.

Also a side issue: the AI sometimes jumps upward when walking over a certain patch of land. Know what could be causing this?
Update to side issue: the AI was colliding with a trigger collider. I’m not sure why it would, as it being a trigger, shouldn’t AIPath ignored it’s heightmapping?

Here are my settings:

Hi

That’s odd. Do you have a screenshot from the profiler, showing what part is using up so much cpu?

I’d recommend not showing the node counter in the inspector (click the i button) since that requires it to actually go through all nodes in the graph to check if they are walkable or not (which can make the inspector slow).

Thanks Aron! Strangely enough, it was my animator window having been open from before I added A* to my project. Some kind of bug. When I closed animator, my framerate stabilized and hasn’t dipped since – animator open or not.

1 Like

Also thanks for the tip. Minimized the nodes to squeeze a bit more performance!

1 Like