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.

Game startup in middle of dual monitors

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()
		Screen.SetResolution (Screen.currentResolution.width,
                              Screen.currentResolution.height, true);