How to enable vsync via config file in packaged game?

Hi,

I’m experiencing some strange behaviour with the bUseVSync option. When setting it to true in Saved\Config\Windows\GameUserSettings.ini of my project and restart the editor, vsync works as intended. When I copy this ini file to either Config\ or Saved\Config\WindowsNoEditor of a packaged game, all commands (e.g. FullscreenMode) are working except the vsync command, which is ignored. When typing r.vsync in the console it says 0 and “LastSetBy:Code”. Doing the same in the editor says 1 and “LastSetBy:GameSetting”, as it should be.

Setting it to 1 manually in the console works, but I’d like the config file to do this for me.

Even more crazy stuff:
The FullscreenMode behaves different depending on where I place the config file. If I place the GameUserSettings.ini under Config\ in the packaged game, FullscreenMode = 2 ignores the ResolutionSizeX and Y set in the very same file, while FullscreenMode 0 and 1 use it. Under Saved\Config\WindowsNoEditor\ though it uses the given resolution.

Anyone an idea?

Have you figured this out yet? I need to do the same thing.

Sadly not, but I haven’t tried this with 4.7 yet. My workaround is to create a custom config variable that stores the vsync setting and on start I set vsync via console command accordingly.

So dumb that that is necessary.

1 Like

This is what works for me, put this in your engine.ini file.

[SystemSettings]
r.VSync=1

This isn’t working for me on 4.11.2

I just tested for you, still works for me 4.11.2, win10, nvidia latest drivers…

Ik this is an old question but for anyone coming over this goto GameUserSettings.ini and then change bUseVSync=False to true

1 Like