# Setting resolution of multiple display screens

in my unity project I have multiple screens. How can I set resolution of each screen? I know Screen.SetResolution(1366,768,true); sets the resolution of a single screen but what about multiple screens?

I disabled unity pop up option before starting the game. Does unity choose maximum resolution by default?

• Did you have "Unity Script" in the title because you're using unityscript? – doppelgreener Jun 12 '17 at 11:15

You need to use the Display class to activate and change resolution of additional displays.

You can access the additional displays using Display.display[i], where i is the display index (main = 0, 2nd = 1, etc.).

Use Display.display[i].Activate(display_width, display_height, display_refreshRate) to activate the additional displays.

Edit: to answer your question in the comment, to make a secondary display go fullscreen, you just need to set its resolution to the native one:

Display.displays[1].Activate();
Display.displays[1].SetRenderingResolution(Display.displays[1].systemWidth,
Display.displays[1].systemHeight);


or, directly,

Display.displays[1].Activate(Display.displays[1].systemWidth,
Display.displays[1].systemHeight, 60);


if the refresh rate is 60 (with the second method, you can't read inside Unity the refresh rate of the secondary display, so you need to know it before hand, or just use SetRenderingResolution to let the graphic card drivers choose it without bothering).

Another important info that I forgot to mention: when inside the Editor, the number of displays reported by the Display class will always be one, the correct number will be reported only in a standalone build (and it only works for PC/Mac/Linux builds).

• what about making all of them full screen? – virtouso Jun 13 '17 at 2:21
• I'll edit my answer to add this info and another one that I forgot to mention before. – Galandil Jun 13 '17 at 10:57