Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Can't limit fps (Solved)

Discussion in 'Windows' started by unity_WK5S3OhA6a4AEw, Dec 13, 2019.

  1. unity_WK5S3OhA6a4AEw

    unity_WK5S3OhA6a4AEw

    Joined:
    Jun 3, 2019
    Posts:
    3
    I am using
    • Unity 2019.3.0f1
    • Universal Render Pipeline with a 2D Renderer
    • Project Quality Setting Vsync Count = Every Second V Blank
    • Monitor: 4k at 60hz
    • Windows 10
    Performance is being checked with Windows Task-Manager
    Build Framerate is being checked with Geforce Experience

    The goal is to keep the game resource-light as possible.

    Game Running in Editor:

    The game is running as reported from the stats menu at 30 FPS
    At this rate, the Task-Manager is reporting 6% CPU / 20% GPU Usage. I would love to see that value also in the Build version.
    Screen Res: 3532 x 1987

    Game Running in Build:

    The game is running around 1400 fps (jumping around a lot ~50).
    Task Manager shows 40% CPU / 40% GPU Usage.
    Vsync did not cap it so by browsing on the web I found Application.targetFrameRate and set it on awake to 30.
    This did not change anything.
    Screen Res: 3840 × 2160 Fullscreen



    -------------------------------------------------------------------------------------------------------------------------------------------------
    The issue is that I want to cap it just like in the editor but for some reason, I am unable to.
    I expect that URP with the 2D Renderer is causing it but I found no way of changing it to be capped at 30.
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    7,767
    Can you try printing out QualitySettings.vsyncCount? Any chance it is set to some weird value?

    Secondly, can you post the player log?
     
  3. unity_WK5S3OhA6a4AEw

    unity_WK5S3OhA6a4AEw

    Joined:
    Jun 3, 2019
    Posts:
    3
    I uploaded the Player.log. I just renamed it to Player.txt since the forum didn't like the file type.
    VsyncCount has been reported with a 2.
     

    Attached Files:

  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    7,767
    Do you by any chance have VSync force disabled in your Nvidia Control Panel? What seems to be happening is that the engine tells the driver to use VSync but it ignores it for some reason.
     
  5. unity_WK5S3OhA6a4AEw

    unity_WK5S3OhA6a4AEw

    Joined:
    Jun 3, 2019
    Posts:
    3
    Thank you dearly. I have forced Vsync On, inside the Nvidia Control Panel. The game is now being capped and performing how I would like it to be.
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    7,767
    You might want to set it to "application controller" as otherwise you won't be able to alter via in game settings if you choose to add that.
     
unityunity