Fps turns to really low when created more than 80 unit

I use grid graph and AIPath to generate path.

When I created more than 80 units, it become really lag

what can i do to fix it


Could you post a screenshot from the profiler so that one can more clearly see what is using CPU power.

It’s only 26 zombies now, but fps gets 9.5 >-<

Could you post a screenshot from the profiler?

sry i dont really understand what’s a profiler >-<

does it mean components on the unit or else

Take a look at https://docs.unity3d.com/Manual/ProfilerWindow.html

I got it, seems too muchphysics work

Indeed. You can click on a frame and change it from Timeline to Hierarchy to get a better overview.

Yeah, but… what causes it?

Is it because the path calculating?

I don’t know. But you might be able to determine why if you use the profiler to inspect the frames. It can probably show you which scripts are causing this.

All right, I’ll try >-<

Thanks for help~