Search Issue Tracker
By Design
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
- Editor crashes when debugging a for loop
- Crash on UnityPlayer!profiling::ProfilerManager::DisposeProfilerRecorder+0xa when Player gets relaunched and exited after running for a long amount of time
- [Input system] When releasing one touch and pressing a second touch during a single frame, the second touch is not translated into UI event line OnPointerDown by the InputSystemUIInputModule
- URP Samples - multiple "Attempting to resolve render surface" and other errors appear when setting Quality pipeline asset
- OnDemandRendering.willCurrentFrameRender returns incorrect values in the Player when UnityEngine.Rendering.OnDemandRendering.renderFrameInterval is greater than 1
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.