Spawning units get stuck first 1-2 seconds, but only when many units on battlefield

Hi I have an issue that happens when a lot of units are on battlefield. The newly spawned units dont start move before a while. Sometimes its 0.5 sec, sometimes 2 sec. Seems to be depended on how strong the computer is.

Here is how it looks both in normal view and in scene view: Spawning units gets stuck in first 1 second or so later - YouTube Notice the enemy units on the right in the beginning moves at once, but later they wait a while before moving.

And here are all the settings I am using: https://imgur.com/a/EXtk4zZ (on the minotaur unit and the graph)

Also I know dynamic grid obstacle is not optimal/supposed to be on the units, but without it they just keep pushing each other, not respecting each others space, so hoping there is a solution where I keep that on the units.

Thanks for reading, and let me know if any information is missing I can provide.

I see that you have the Draw Gizmos option activated in each seeker component and you also have the Show graphs option activated in the Pahtfinder/About component, you should deactivate these options since they consume a lot

1 Like

Hi

I think it’s likely that the pathfinding system is getting overloaded and cannot process path calculations fast enough. You should be able to see this in the Unity Profiler. At the bottom of the timeline view there should be a section called “Pathfinding” where you can see the pathfinding threads:

1 Like