Search Issue Tracker
By Design
Votes
26
Found in
2020.3.46f1
2021.3.22f1
2022.2.13f1
2023.1.0b10
2023.2.0a8
Issue ID
UUM-31475
Regression
No
[macOS] "Preventing Sleep" setting is set to "Yes" in a built Player application
How to reproduce:
1. Create a new project
2. Build And Run the project
3. Open Activity Monitor
4. Observe the “Preventing Sleep” setting of a built app
Expected result: “Preventing Sleep” is set to “No”
Actual result: “Preventing Sleep” is set to “Yes”
Reproducible with: 2020.3.46f1, 2021.3.22f1, 2022.2.13f1, 2023.1.0b10, 2023.2.0a8
Reproduced on: macOS 13.2.1 (Intel)
Not reproduced on: Windows 11
Comments (2)
-
s1m0n1stv4n
Jun 01, 2024 06:09
Hi,
This is still not resolved. Please reopen issue, to be able to vote again.Manual says it all (Screen.sleepTimeout):
"Does nothing on non-handheld devices."macOS standalone builds made with Unity still prevents computer from going into sleep.
Please suggest something to resolve this issue!
Thanks! -
ninodwin
Jul 11, 2023 19:22
Hello,
This resolution Screen.sleepTimeout = SleepTimeout.SystemSetting does not work for macOS at runtime. Prevent sleep is still set to 'Yes" when a default Unity MacOS project is running and the shared API Screen.sleepTimeout = SleepTimeout.SystemSetting does not have any effect.
The Api only works for Android and Ios but not for macOS.
Please suggest how we can prevent the Unity3D app from overriding prevent sleep on macOS
regards
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
- The Scrollbar becomes unusable when adding Elements to the List
- "One or more data file missing for baking set NewScene Baking Set. Cannot load shared data." error in Player when a specific project is built
- Choosing new HDR Colour using RGB values breaks colour on Intensity Selectors
- Rendering/Decal Layer Mask options are different inside Prefab Mode and outside Prefab Mode when the project is upgraded to Unity 6
- Incorrect Realtime GI Light Probes baking when more than one Light Probe Group is used and "Baked Global Illumination" is enabled
Resolution Note:
Default setting is to prevent sleep. Please use this API control this behaviour: Screen.sleepTimeout = SleepTimeout.SystemSetting