Getting Unity to render across multiple monitors

At the moment I am trying to get unity to run across 2 monitors. I’ve done some research and know that this is, strictly, possible. There is a workaround where you basically have to fluff your window size in order to get unity to render across both monitors.

What I’ve done is create a new custom screen resolution that takes in the width of both of my monitors, as seen in the following image, its the 3840 x 1080:

enter image description here

How ever, when I go to run my unity game exe that size isn’t available. All I get is the following:

enter image description here

My custom size should be at the very bottom, but isn’t. Is there something I haven’t done, or missed, that will get unity to take in my custom screen size when it comes to running my game through its exe?

Oddly enough, inside the unity editor, my custom screen size is picked up and I can have it set to that in my game window:

enter image description here

Is there something that I have forgotten to do when I build and run the game from the file menu? Has someone ever beaten this issue before?

OK, so I played around with this a bit and figured out a solution that works (not sure if it’s a good final solution, but it does what it’s supposed to do.

In ‘Player Settings’ set your default Resolution to (in your case) 3840 and 1080. Then, and this is the key(!), set ‘Display Resolution Dialog’ to ‘Hidden By Default’ and make sure ‘Default Is Full Screen’ is NOT checked. This way it will not ask for the resolution (which won’t have the custom one you want) and set it automatically to the resolution you set at (in the following script).

Next, create an empty game object (or place this script where you feel it fits best):

void Start () {
	Screen.SetResolution(3840, 1080, false);

Basically, if you allow it set the resolution via the startup screen or tell it to use full screen it restricts the view to a single monitor. If you tell it what resolution you want and allow it to run in windowed mode it will stretch across both monitors.

In my case I have two monitors and just got the Oculus Rift DevKit today. My first monitor has 2 cameras which are duplicated onto the Rift headset and my second monitor has a single camera. This way I can have one player use the headset and a second player play on the other monitor using mouse and keyboard. This could easily be expanded by setting up a Hydra controller for the player using the Rift.

I hope this works for you!

Hi All,

I wanted to display my Unity project through my extended desktop running onto two monitors.

To do so, I have followed the previous advice, I have included in my code:

Screen.SetResolution(3840, 1080, false);

and set the following options in my PlayerSettings:

Default is Full Screen: Unchecked.
Default is Native Resolution: Unchecked.
Default Width: I have written my desired width (3840), but it does not seem to matter as the setResolution() method seems to overwrite it.
Default Height: Same as above.

Standalone Player Options
I have disabled the “Display Resolution Dialog”
I left the rest as it was.

Then I built and ran my project. The outcomes appeared shared between my both screens but in a window. To get rid of the window, I ran my project from the console using as:

C:\myProject.exe -popupwindow

As a result, I have the project running on my whole extended desktop. This is very useful for passive stereo systems using two projectors.



From what I can understand, you use the Display class to do it.