Search Issue Tracker
Fixed in 2018.2.X
Votes
0
Found in
2018.1.0b1
Issue ID
982337
Regression
No
Application.targetFrameRate doesn't work in batch mode when VSync is on
When starting Windows Standalone in a -batch mode it eats around 60% of my Core i7 CPU (it is empty project with empty scene !!! )
Note: when I run this Standalone without -batchmode flag - it uses 1-2 % of CPU
Tested on Windows 7 64b - happens in all versions since 5.6.3.f1(didn't check earlier versions)
For more info on -batchmode flag please read this docs page - https://docs.unity3d.com/Manual/CommandLineArguments.html
How we can reproduce it using the example you attached
To reproduce this from new project:
- Create new Unity project
- Go to File->Build Settings and build Standalone
or simply
1 Download attached folder
2 Find "testBatchmodeBug.exe" file and run it in comand line with -batchmode argument
or simply run "testBatchmodeBug.exe - Shortcut" shortcut (it already has -batchmode argument applied)
3 Open "Windows Task Manager" and find "testBatchmodeBug.exe" process in "Processes" tab
Actual results:
it uses up to 60% of my Core i7 CPU - please see attached image
Expected result:
this Standalone should use 1-3 % or so of CPU
Workaround: set Application.targetFrameRate to desired frame rate and disable VSync
Comments (3)
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
- [UWP] Mouse movement re-triggers stale <Mouse>/scroll value after the scroll wheel is used once
- "Shutdown worker was forced killed because it kept running. Worker ..." errors are thrown after building a blank HDRP project
- [UI Toolkit] USS materials in AssetBundles break due to InstanceID referencing a material that no longer exists when a Scene is loaded through Addressables for the second time
- Help button leads to a missing documentation page when clicked on a Font Import Settings in the Inspector
- TextMeshPro Text Component reads bottom-to-top instead of top-to-bottom when using RTL Editor
ClosingTime
Jan 15, 2022 11:22
@CELERONPM
I have the same issue as well in 2021.2.7f
celeronpm
Jan 06, 2022 18:05
I am seeing this behavior in 2021.2.7f1 resurface. Can anyone confirm they are unable to get APPLICATION.TARGETFRAMERATE to honor the target when in batchmode?