Game slows to a crawl with more than 4 AIPath objects

I have an enemy object that sets the player as the AI Destination Setter target. It calculates a path and follows the player just fine.

However if I have more than 4 copies of this enemy the game slows to a crawl, both in and out of the editor.

I’ve tried setting the pathfinding thread count to 8 as well as upgrading to Pro, but it’s still slow. I’ve also tried all of the suggestions from the doc as I can

It feels like only 4 copies should not be slowing things down this much. What else can I check?


Do you think you could use the Unity profiler to check what is using all the CPU power? 4 agents really shouldn’t be a problem performance wise.

1 Like

Hi, it seems the issue was related to Physics2D instead of AI.

Thanks for the response!