How to stop performance issues?

Hey, Im making a zombie survival game and the spawner is working ok, but as soon as I spawn 30+ zombies the game seriously starts loosing fps. I thought it was the navmesh agent I was using, but I turned them off and its still lagging. Any idea of why could that be caused?

Unless you’re doing something incredibly heavyweight, render complexity usually dwarfs script time. If your zombies have a lot of geometry or complex effects, that may slow things down.

Other possibility, check your editor console for error messages. Each error fires a stack trace, which can really slow things down.

If you have Unity Pro, you should check out the profiler.