First of all, I’m a performance noob, I don’t understand a lot of things regarding performance in Unity except for one thing, less number of Tris and Vertex are good for performance.
So, as you can see, there are four turrets placed in the scene. When all of them are in Camera view, the Tris count is 73.5K and Verts count is 114K. I don’t know if these numbers are good or bad.
But, sometimes the game lags. For example, the turrets explode on reaching 0 health. The game lags when the explosion is going on. Maybe it’s the particle systems? (Cause I think I have a lot of those)
There could be maybe reasons for slow-down. Try using the profiler to figure out what is going on:
Good luck!
Ahem typo sorry - “many”, not “maybe”!
Vertex count is rarely the issue. Think about it this way, you have 114k vertices to transform from local space to screen space. That code is a few lines long. Meanwhile, your rendering to a 1080p screen, which even if you have no overdraw (very unlikely), is 2 million pixels, pixels which sample several textures, do lighting, shadows, etc. With overdraw, post processing, deferred g-buffers, etc, you could easily be touching 10million pixels a frame or much more. The 114k vertices you’re transforming are a minuscule amount of work in comparison.
The only time vertex count is likely to be an issue is when you are having micro-triangle issues; essentially triangles smaller than about 10x10 pixels in size start to get more expensive, as GPU’s shade in blocks of pixel, causing the shading to do lots of work which gets thrown out. GPU side, it’s really the only reason to even have LODs anymore.
I think you answered your question there. Too many particles systems and particles, might definitely be one of the causes, for the lag your game is experiencing. Worse if all of the particles, have physics on them.