Application.targetframerate affects other running games

Hi,

I could manually adjust my application.targetframerate while running the game. If I adjust it to 60, it seems other games running on computer are affected, like for example Dota 2, will also limit framerate to 60. If i change my games application.targetframerate to 120, Dota 2 will also increase its fps. How can i fix it?

Unity version 2019.3.0b8

That… makes no sense. Setting target frame rate just changes how long the Unity sleeps every frame. It doesn’t touch any system wide settings. Are you observing the changes in other games while your Unity game is running, or even after your game is closed?

Secondly, may I ask why are you using TargetFrameRate at all? VSync in most cases is a much superior way to do it as it uses your GPU to limit frame rate, rather than inaccurate sleeps. Using TargetFrameRate might result in stutters, uneven frames and increased input latency especially when you’re running above 60 fps.

It’s only when the unity game is simultaneously running with other game.

Well, I have no idea why that’s happening. However, I suggest switching to using VSync on your game instead of Application.targetFrameRate. Not only it will likely solve your problem but it will also make your game run smoother.

If the same thing happens with VSync, I’ll need an ETW trace to investigate this further.