- Home /
Setting game as full screen, but opens in window between two monitors
I've been scratching my head over this for a day now. Some of our testers have reported that the game initially boots between their dual monitor setup. Our game start up defaults to fullscreen (from the player settings), with no resolution dialogue.
As you can see from the screenshot, this doesn't work and the player boots to windowed mode, centred on the two monitors.
Bumping. I'd like to get an answer to this as well. It seems like it's trying to center the window before full screening, but ends up in between the multiple displays.
I know I'm not alone in this :) Has anyone found a workaround for this?
Answer by sed · Nov 19, 2014 at 11:15 AM
The solution I've found is to use:
Screen.SetResolution (Screen.currentResolution.width, Screen.currentResolution.height, true);
Add it to Awake() function of one of your behaviours that are known to be there from the app's launch and it will go straight to native res fullscreen.
If you want it to happen only on windows you can use defines:
void Awake()
{
#if UNITY_STANDALONE_WIN
Screen.SetResolution (Screen.currentResolution.width,
Screen.currentResolution.height, true);
#endif
}