Hello, I get consistent lag spikes.

Hello, I have been dealing with this for over a year. several iterations, maps sizes, water, not water, tenkoku, no tenkoku, lots of buildings, not lots of buildings. It does not seem to matter, If I turn to quickly, or run, it will drop 20-30 points for a second or a few seconds to catch up, then it works smooth again. So it happens when I am am 145 frames per second, it will drop to 105, then go back up. or if I am at 35 fps, then it will go from 35 and drop to 12-15 fps for a few seconds, the it will catch up, then it will go back. How do I prevent it from dropping 20-30 points. Please help.

I can’t be sure entirely how to fix your problem without thoroughly looking through your project, but I would recommend using Unity’s Profiler to determine what the cause of your lag spikes is. Here are a few resources to help you get started:

Yes, thanks for your quick response. However let me make this situation more clear. I do use the profiler, and yes, I know what causes the drop. It’s the water, so I remove the water, or what ever innitiates the lag. My point is it should not lag, So, once again, if I was at 145, it will drop to 105 or 90, If I am at 35 it will drop to 15. I can keep on removing all the items that initiate the original cause, grass, trees, water, sky, buildings, script. And I can run around at 180 fps per second. That is not the point. The problem, is that is seems like the UNITY engine, has to catch up for a second or two, then I can continue on. If I run super fast, and turn, it will happen. Its a a catch up situation. I know that this does not happen in the succsessful Unity games out there. This has got to be a common problem, in that I have been experiencing it for over a year now, in many, many, many projects. I am getting towards the end of the project, and now I need to solve this problem. Any help will be helpful.