Massive framerate drops because of terrain

Hey,
so since a time I’m doing a game for fun and to this point it all worked fine but
there is a BIG issue now with the game and the issue is when i walk against a chair like you see in the video my framerate drops to ~10 fps and I think it’s the terrain even if I don’t know why but when I turn it off it all works fine and I don’t have many details on the terrain I only have a bit of grass and I think it causes the issue especially .

Video:

Settings Image:

Terrain Image:

Profiler Video:

Thank You in advance! :smiley:

Rather than guess that it's the terrain causing the framerate drop (can't see why it would be - I can't even see any terrain in that video), why not use the profiler to find out what's actually causing it? https://unity3d.com/learn/tutorials/topics/interface-essentials/introduction-profiler

Nope really the console is completely empty

true true. thanks man

2 Answers

2

I mean, the amount of grass i can see from the pictures won’t be nearly enough to make a 960 sweat. I can tell that it’s CPU bound, the profiler says it’s the FixedUpdate(). Even if it’s advised to put physics in FixedUpdate, can you move the code in Update()? And even if it still persists…are the objects you are hitting a kinematic rigidbody?

1: I moved the code from FixedUpdate and it started working atleast I don't get any drops at that and any other places now. 2: Beside the character there aren't any objects yet that have a rigidbody applied. And thank you atleast for that (not permanent) but good "fix" But I honestly still don't understand it that well bcs it's a script made by unity and not really modified by me or someone else :D

Okay Thank you very much for your help :DD You saved my day ^^ Got now around 150 fps instead of 60 - 70

Just accidentally found this out today. The editor itself can lag a lot (especially in unity 5) but this can be easily fixed by going to Edit-> Preferences ->GI Cache → Clear cache

Just like that mine went from 5fps to 40fps in play mode.