Screen.resolutions is empty?

Hi, folks. I’m working on porting our project to Linux, and when I attempt to run it, some of the resolution-setting code we have is erroring out. We’re assuming that Screen.resolutions will always have at least 1 entry in the list, but that doesn’t seem to be the case. When running it in Linux in the editor, the array is empty, and according to the docs, this should only happen on Android. Is there a different standard for this on Linux? Or am I missing something else? Or maybe this is a bug?

I’ve tried the code base on another computer, in case it was a bug caused by my multi monitor setup or something. It’s still happening there. I’m really not sure if this is a bug or if I’m doing something wrong. Shouldn’t Screen.resolutions always have multiple values as per my monitors and such? Is there some possibility that Unity is detecting my Linux system as Android?

Having the same issue. Did you ever find a resolution?

1 Like

Same issue. Screen.resolutions is empty for android.