Profiler question

So I’m using the profiler and I see that this takes 76% and I don’t know what it means; Gfx.WaitForPresent

Whats this mean and why does it take so much space?

Is VSync enabled (ie. the fps capped at 60 FPS)

more specifically V Sync Count = Every V Blank in Quality Settings?

V Sync shows up as Gfx.WaitForPresent

WaitForPresent is simply that your game waits for the next hardware vsync (vertical sync) of your graphics card / monitor. The vsync happens everytime the monitor has completed updating the whole screen.

Unity uses double buffering. That means what you’re rendering during a frame is rendered to a secondary buffer in the graphic card memory. When the vsync happens the buffers are simply swapped. So the buffer you actually rendered your frame into is now the one that is used to update the screen. It makes no sense to swap the buffers while the monitor is during an update as you would see a tearing effect.

So if the waiting for the next vsync takes 76% of your frame time, that means that you are actually finished drawing your frame after 24% of the “native frame time”. For example at 60 Hz the frame time is 1/60 s == 16.6 ms. Your frame only took about 3.98ms to render and you have to wait about 12.6ms until you swap the buffers again and you can start with the next frame.

If you disable vsync (in the settings and maybe even in your graphics card settings as some force this setting), Unity won’t wait for vsync and renders frame after frame as fast as possible. However since your hardware doesn’t display anything in between “hardware frames” it makes not much sense to disable vsync.

This time is nothing you should worry about since if your rendering takes longer the time will get smaller.