Search Issue Tracker
By Design
By Design in 2023.2.X
Votes
0
Found in
2021.3.6f1
2022.1.8f1
2022.2.0a18
2023.1.0a1
2023.2.0a1
Issue ID
UUM-2523
Regression
Yes
Application.targetFrameRate is ignored and causes huge CPU usage
How to reproduce:
1. Open the attached "TestFPS2019.zip" project
2. Open the "SampleScene" Scene
3. Enter Play Mode
4. Open the Activity Monitor or Task Manager on your OS
5. Select the "<Script>" GameObject from the Hierarchy Window
6. Click once on any of the different buttons labeled "Set xx FPS"
Expected result: No degradation of the CPU performance
Actual result: CPU performance degradation
Reproducible with: 2021.2.0a2, 2021.3.10f1, 2022.1.17f1, 2022.2.0b8, 2023.1.0a11
Not reproducible with: 2019.4.39f1, 2020.3.40f1, 2021.2.0a1
Reproduced on: macOS (Intel) Monterey 12.0.1
Important: User reported the issue on Windows. For macOS (Silicon), the targetFrameRate is already being tracked in:
[https://issuetracker.unity3d.com/issues/m1-max-player-ignores-application-dot-targetframerate]
Note:
- CPU usage sways between ~110-125% of usage on macOS
- Not Reproducible on Windows OS
- Reproducible with these APIs: Metal, OpenGL
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Package signature validation unexpectedly return an invalid signature status if the validation check is done after the code signing certificate validaty range has passed
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
Resolution Note:
This is a documented behaviour: https://docs.unity3d.com/ScriptReference/Application-targetFrameRate.html
<...> On all other platforms (Mac editor included), Unity ignores the value of targetFrameRate if you set vSyncCount. When you use vSyncCount, Unity calculates the target frame rate by dividing the platform's default target frame rate by the value of vSyncCount. For example, if the platform's default render rate is 60 fps and vSyncCount is 2, Unity tries to render the game at 30 frames per second. <...>
High FPS is expected to in turn cause high CPU usage.
Resolution Note (2023.2.X):
This is a documented behaviour: https://docs.unity3d.com/ScriptReference/Application-targetFrameRate.html
<...> On all other platforms (Mac editor included), Unity ignores the value of targetFrameRate if you set vSyncCount. When you use vSyncCount, Unity calculates the target frame rate by dividing the platform's default target frame rate by the value of vSyncCount. For example, if the platform's default render rate is 60 fps and vSyncCount is 2, Unity tries to render the game at 30 frames per second. <...>
High FPS is expected to in turn cause high CPU usage.