- Home /
Windows: Multi Display with two different resolutions
Hi all! I'm currently working on getting multiple displays to work in my project. So far I have got both displays working but because my monitors are different resolutions one screen doesn't draw correctly as you can see in the link below: https://i.gyazo.com/0f4ccbd0b84a6b03f6428131c6ab4105.jpg
But if I change the monitors to be the same resolution it all draws correctly. https://i.gyazo.com/2e23d2f2a40bef73d8622495b939210d.jpg
Anyone got any idea on how to fix this?
Here's the code i'm currently using to get multiple displays working:
void Start()
{
for (int i = 0; i < Display.displays.Length; i++)
{
Display.displays[i].Activate(Display.displays[i].systemWidth,
Display.displays[i].systemHeight, 60);
}
GetComponent<Camera>().targetDisplay = 1;
}
Answer by mikelortega · Feb 17, 2016 at 12:38 PM
It's a bug in Unity 5.3, issue id 747475, it will be fixed in Unity 5.4.0. I guess you should check if you have the same problem with the beta.
Issue 747475: The second screen in the multi-display mode gets weird offset when using different screen resolutions.
Hi - I've still got this problem in 2017.3 and 2018.2
multiple displays with different resolutions - have added -multipledisplay into with the command prompt also.
the setparams width and height make no difference ( the offsets do, but it's massively incorrect scale-wise )
I assumed as this was fixed in 5.4.x then it was no longer a problem - do you think I'll have to roll back that far ?
Answer by imbalance · Feb 17, 2016 at 10:38 AM
Display.displays [i].SetParams (width, height, 0, 0);
Writing Display provides access to a display / screen for rendering operations.
Display.displays is the list of the current connected displays.
Display.displays[number] is the display index number that you wanna modify.
Display.displays[i].SetParams (width, height, 0,0) is a method to set rendering size and position on the screen.
It seems like you are just starting out, you should check all the basic stuff about coding with Unity. Play with arrays, lists and create your own methods with variables, it will help you a lot to understand this stuff.
yeah I know what it does, I want to know why this is submitted as an answer.