Search Issue Tracker
Active
Under Consideration for 2021.3.X, 2022.3.X
Fixed in 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.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Search] Query Builder - uneditable NaN in Transform vectors
- Transform.rotation property is as a Vector4 Quaternion instead of a Vector3 field when using InspectorElement.FillDefaultInspector
- [Search] Query Builder - "Input String was not in a correct format" error when changing query options
- MacOS Xcode project build fails when a package has PrivacyManifest
- [IL2CPP] Crash when closing the Player while an exception is thrown during exception handling
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.
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.