Set Resolution game like Desktop Resolution not possible?

Hi,

I have try to insert in the Awake of my script that start in the first GameObject into the first scene this instruction:

Screen.SetResolution (Screen.currentResolution.width, Screen.currentResolution.height, true);

for to play with current desktop resolution my game (because i not want to load display resolution dialog).

BUT NOTHING !!!

It start to resolution 1024x768 that is to default from :

File/BuildSetting/PlayerSetting/"Resolution"

WHY it think that my desktop resolution is 1024x768? There is a way for to start before this script and next the setting of Unity? Or there are other solution?

Ps. I have disable DISPLAY RESOLUTION DIALOG.

1 Answer

1

Screen.currentResolution only tells you the desktop resolution if you're running in windowed mode, so you should start in windowed mode instead of fullscreen mode.