ScriptReference/QualitySettings-vSyncCount #97
Replies: 2 comments
-
|
VSync will try to synchronize the framerate to divisions of the monitor's refresh rate. ExamplesWith a 60hz monitor QualitySettings.vSyncCount = 0; // FPS capped by targetFrameRate
QualitySettings.vSyncCount = 1; // 60/1 = 60fps
QualitySettings.vSyncCount = 2; // 60/2 = 30fps
QualitySettings.vSyncCount = 3; // 60/3 = 20fps
QualitySettings.vSyncCount = 4; // 60/4 = 15fpsWith a 144hz monitor QualitySettings.vSyncCount = 0; // FPS capped by targetFrameRate
QualitySettings.vSyncCount = 1; // 144/1 = 144fps
QualitySettings.vSyncCount = 2; // 144/2 = 72fps
QualitySettings.vSyncCount = 3; // 144/3 = 48fps
QualitySettings.vSyncCount = 4; // 144/4 = 36fpsScreens with adaptive sync (AMD Freesync, Nvidia G-SYNC) adjust their refresh rate to fluctuating framerates between some limits. Ideally VSync is disabled, and a frame rate limit is applied using |
Beta Was this translation helpful? Give feedback.
-
|
Note that this value needs to be saved by hand between launches (such as with PlayerPrefs etc), and reapplied when loaded. This is unlike Screen.SetResolution which persists automatically. If you're not sure what value to use for vSyncCount and don't want/need the game to draw at super high framerates, one option is to find the value that will give you the closest to 60fps. For example based on this post, I use the following: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
ScriptReference/QualitySettings-vSyncCount
https://docs.unity3d.com/ScriptReference/QualitySettings-vSyncCount.html
Beta Was this translation helpful? Give feedback.
All reactions