Changin VSync Count doesn't affect FPS on editor playmode

Hey after upgrading from 2018 to 2020, we noticed that VSync Count on ProjectSetting → Quality settings does not change the fps when entering playmode on editor.
Previously on 2018 setting VSync Count to Every Second V Blank will lock fps to 30 on playmode. But, on 2020 the fps reach above 200 and changing VSync Count to other options wont change the output fps.

Ah, yes I know in 2020 you can enable VSync with Game window by clicking Vsync (Game view only) on change resolution dropdown menu. But that doesn’t solve our problem.

Is there a way to lock the fps down to 30 with VSync Count ?
I know I can set the fps to 30 with Application.targetFramerate. I just want to know why VSync Count doesn’t work anymore after the upgrade and is there someway to make it work again like 2018 ?

I’m on 2022.1.14f1 and noticed that the Game view in PlayMode always has VSync on, whether the VSync checkbox is checked or not and whether I choose a Quality setting with Vsync on or off or “every second” - I always get 60 fps in Game view.

Which, actually, is a bit curious because my monitor runs at 120 Hz on the desktop. So this definitely seems forced. But it’s not forced on the driver side. Nor can I force Unity.exe to have Vsync off, I still get 60 fps when I try that.

I added a simple script that sets Application.targetFrameRate on Update() with a slider to it. If I set it to 30 I’m actually getting a fluctuating FPS in Game view stats - this thing cannot be trusted. I added the free [Graphy] framerate display and yes, it is capped at 30 fps. But playing around with VSyncCount at runtime doesn’t change anything.

Here’s the script:

public class TargetFrameRateSelector : MonoBehaviour
{
    [Range(1, 120)] public int MaxFrameRate = 60;
    [Range(0, 4)] public int VSyncCount = 1;
    private void Update()
    {
        Application.targetFrameRate = MaxFrameRate;
        QualitySettings.vSyncCount = VSyncCount;
    }
}

I don’t know whether this has actually changed though. There are old threads reporting on this issue .

Game view is, after all, just a “simulation” so should not be used to judge performance respectively the game’s programming should not rely on Game view to behave exactly like a build. My best guess is that it was deemed too unimportant, and that consistent behaviour by default is better. Users rarely want to have more or less than 60 fps in Editor playmode, but if they do, there’s always Application.targetFrameRate available.

8399394--1108896--upload_2022-8-29_16-21-20.png

There’s a new checkbox for the editor:
8410542--1111383--upload_2022-9-2_16-5-26.png

3 Likes