Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Limit framerate in Unity Editor for game window

I'm trying to limit my FPS to 30, as I really don't need more. Naturally I've tried to set the Application.targetFramerate to 30, as well as QualitySettings.vSynCount to 0. The FPS always stays close to 60. I've also tried to set vSyncCount to 2, which also doesn't work.

How can I limit the FPS in Editor game view? (Note: not scene view)

I am on Linux, Unity v 2017.1.1.

like image 691
RobotRock Avatar asked Dec 12 '25 09:12

RobotRock


1 Answers

If Screen.setResolution is called before, then targetFramerate and vSyncCount are adhered properly in Editor game view.

    Screen.SetResolution (1920, 1080, false);
    QualitySettings.vSyncCount = 0;
    Application.targetFrameRate = 30;
like image 124
RobotRock Avatar answered Dec 15 '25 22:12

RobotRock