- Home /
Screen.currentResolution values don't change after SetResolution in Mac builds
Hi all!
I need to check my game current resolution after I change it in my custom resolution settings. On Windows build I change the resolution (with Screen.SetResolution), and the change is actually reflected in the Screen.currentResolution values (width and height).
On Mac build though, the values are always the same, even after the changes.
Is that a Unity bug or is there a specific reason?
Thank you for your time!
Answer by UncoolName · Jan 22, 2018 at 02:30 PM
I found a solution to this problem and I thought it could be useful to someone :)
Since Screen.currentResolution width and height are not updated after a SetResolution on Mac and Linux systems, I tried to use Screen.width and Screen.height and it did the trick!
Those variables actually contain the updated values I needed and now everything works fine!
Your answer
Follow this Question
Related Questions
Changing screen resolution on Mac standalone build 0 Answers
Open Other Project no longer browses folders 0 Answers
Mac OS X Build Execute File? 1 Answer
Cannot Get PS3 Controller Input Working on Mac 0 Answers
How to get Mac's dock size? 0 Answers