- Home /
Opening profiler increases FPS
Every time I run my game in the editor it is capped at below 30FPS, however, as soon as I open the profiler and give the focus to the profiler window, the game FPS skyrockets to over 500, which is what I expect from my hardware. Question is, how can I have this FPS without opening the profiler? This seems like a bug to me.
EDIT: I looked at the profiler a little closer and found out that while the editor is in focus, gfx.WaitForPresent is taking up >90% of the CPU, and when I switch the focus to the profiler window that process disappears and my game runs smoothly.. This happens with VSYNC both on and off. This is very strange.
EDIT2: The culprit for me was G-SYNC. As soon as I turned that off everything became much smoother as expected.
I'm having the same trouble right now with my gearvr application. Isn't Gsync a monitor setup not something you can edit in Unity?
Answer by LEDWORKS · Jul 09, 2018 at 02:27 PM
For accurate FPS testing run your application from a build, Unity's profiler will never be spot on as it is compensating for the overhead of running in the editor.
Implement your own FPS counter by measuring deltatime, the profiler is for identifying issues with FPS not giving you an accurate value for FPS of the game when built.