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.