Hi all! I normally do not write in those forums but I don’t know what to do with this issue: My game normally runs in 60 FPS (30 in some places with a lot of objects but just for a few seconds), but now I am having a weird and random frames decrease (12 or 10 FPS - Attached Image) and I really don’t know what is causing this error. I think that is related to the “PlayerLoop” (seeing the profiler) but I really do not understand this tool). Do any of you have an idea of what is happening?. I really appreciate your help.
You’ll want to dig a bit deeper into that profiling result. I find that the Hierarchy view in the profiler is a bit easier to find “hot paths”. In your case, all I can really see if that FixedUpdate is accounting for most of the time. So, either you’ve got a bunch of rigidbodies interacting, or you’re probably doing something expensive in a FixedUpdate method in one of your classes. You’ll probably want to enable Deep Profiling, then drill down into the specific method calls that are responsible for the CPU usage.
You could press ‘A’ in Timeline to frame the entire frame time. This is only showing 5 ms out of 158 ms.
Sounds like editor overhead and issue, try it in a build to see if the issue is still there.
Hi everyone thank you for the replies. I finally couldn’t find the error but after changing some things on the lights and baking it, the cash disappear.