Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Game runs faster with vsync on?

Discussion in 'General Graphics' started by madGlory, Oct 14, 2020.

  1. madGlory

    madGlory

    Joined:
    Jan 12, 2016
    Posts:
    44
    Hello,

    I am currently noticing that when we turn vsync on, our game runs very smooth and easily gets to 60fps. However, when vsync is off, the game runs very inconsistenlty.

    How can we make the game run smoothly with vsync off?

    This is vsync on:
    Screen Shot 2020-10-14 at 5.14.13 PM.png


    This is vsync off: Screen Shot 2020-10-14 at 6.41.52 PM.png
     
  2. Sky77

    Sky77

    Joined:
    Jan 30, 2014
    Posts:
    171
    You’re not running faster, you’re running more consistently.
    Without limiting the frame rate or vsyncing, you’re simply telling the game to churn out frames as fast as possible, which means that or you’re able to sustain a super high frame rate consistently, or your frame time will vary wildly, since maybe you’re able to finish a frame in 0.4ms, but maybe the next one will be a lot higher for various reasons.
     
  3. madGlory

    madGlory

    Joined:
    Jan 12, 2016
    Posts:
    44
    Is there a way to have the game run consistently without vsync on? I have tried Application.targetFrameRate = 60 but it seems to affect nothing.
     
  4. Sky77

    Sky77

    Joined:
    Jan 30, 2014
    Posts:
    171
    On which platform?
     
  5. madGlory

    madGlory

    Joined:
    Jan 12, 2016
    Posts:
    44
    Mac and PC currently