Search Issue Tracker

Fixed

Fixed in 2021.3.44f1, 2022.3.46f1, 6000.0.3f1

Votes

2

Found in

2021.3.34f1

2022.3.18f1

2023.2.6f1

2023.3.0b4

6000.0.0b11

Issue ID

UUM-61892

Regression

No

Frame rate is higher than expected in Play Mode when target frame rate is set with Application.targetFrameRate

--

-

Reproduction steps:
1. Open the “ReproProject“ project
2. Open the “Assets/Scenes/SampleScene“ Scene
3. Enter Play Mode
4. Open the Rendering Statistics window by clicking the “Stats“ button in the top right corner of the Game view
5. Observe the Rendering Statistics window

Expected result: The FPS is 45
Actual result: The FPS is higher than 45

Reproducible with: 2021.3.34f1, 2022.3.18f1, 2023.2.6f1, 2023.3.0b4

Reproducible on: Windows 11 Pro (22H2)
Not reproducible on: No other environment tested

 

The mentioned project seems to have Game Mode vsync on.

Please note that Application.targetFrameRate only works when vSync off according to the [documentation|https://docs.unity3d.com/6000.0/Documentation/ScriptReference/Application-targetFrameRate.html].
{quote}Desktop and Web: If QualitySettings.vSyncCount is set to 0, then Application.targetFrameRate chooses a target frame rate for the game. If vSyncCount != 0, then targetFrameRate is ignored.
{quote}
And vSync in GameView need to be [disabled with the UI in Game view Control Bar|https://docs.unity3d.com/6000.0/Documentation/Manual/GameView.html].

 

However, the GameView FPS is still capped by targetFrameRate even if the vSync is on. This is inconsistent with the documentation. A fix will be submitted to address this.

  1. Resolution Note (fix version 2022.3.46f1):

    Fix FPS capped by target framerate issue when Vsync is on to align with the documentation

  2. Resolution Note (fix version 2021.3.44f1):

    Fix FPS capped by target frame rate issue under vsync to align with documentation

Comments (2)

  1. Snake-M3

    Apr 03, 2024 12:17

    Disregard previous comment, I realized the "VSync (Game view only)" option was the culprit.
    Thanks for the clarification.

  2. Snake-M3

    Apr 03, 2024 12:07

    "The mentioned project seems to have Game Mode vsync on."

    The repro project I initially attached had vsync off.
    Can you guys please try to reproduce the problem with vsync off?
    I have vsync off, and TargetFrameRate works intermittently. For example, I have it set to 60, but the game windows seems to ignore this value, allowing the FPS to go up to 75.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.