Multi Display Not working after scene reload.
Hi,
I am facing a weird issue, I currently have two cameras outputting to two different displays(monitors) by using multi display.
I am activating both of these displays via a script.
Debug.Log("displays connected: " + Display.displays.Length);
if (Display.displays.Length > 1)
Display.displays[1].Activate();
if (Display.displays.Length > 2)
Display.displays[2].Activate();
Now the problem is that when ever i reload the scene, the secondary display just freezes up, whereas the primary display works as it should.
Everything works fine in the editor, but the standalone builds are messed up.
Any Solutions to that?
Kind Regards, Saad
Answer by Shark4 · Nov 17, 2016 at 05:06 PM
I manage to make it work by checking if the display was already activated before activate it. You see I have this script that active display like on the example in the manual: (Display.displays.Length > 1) Display.displays[1].Activate();
But I have this script in all my scene so after I loaded the new scene it active again and it was this that cause the bug.
So I make a static bool that register if the display was activated or not before activate it...
static bool display1 = false;
void Awake () {
if (Display.displays.Length > 1 && !display1) {
Display.displays [1].Activate ();
display1 = true;
}
}
So it's not really a bug, but having it to check by itself when we call the Activate() function to not calling it if it was already activate would be cool.
this method works! my second display was getting frozen when I switched between scenes, despite having exactly the same parameters. Thanks Shark4
Answer by ddsinteractive · May 10, 2016 at 08:15 PM
What do you have your game screen resolution set to? Are you manually overriding it to span the monitors or is it set to native resolution for one monitor?
Answer by saadminhas101 · May 11, 2016 at 10:10 AM
It's set to native resolution for each monitor. i have two 1920 * 1080 screens,
everything works fine the first time i launch the application, but as soon as i try to reload a scene, the secondary display just shows a frozen frame from moment just before I reloaded the scene and it stays that way.
Only way to get around is to exit the application and relaunch it.
Answer by rahleenos · Jun 11, 2016 at 11:30 PM
I am having the same problem, have you found a solution yet?
No Unfortunately not,
I am relying on closing down the application and starting it up again, which is not an ideal solution.
I am starting to suspect that this might be a unity bug with multi displays. Hope the official unity folkscan take notice of this issue.
Assu$$anonymous$$g this is a stand alone app.... what you may want to do is clear out the RegEdit preferences for the application, reboot the computer, then relaunch. That was our issue. The RegEdit key was "holding" the screen resolution and kept reverting it on us.
Note, the key will be under the company name as defined in the standalone app player settings.
Reference link: http://answers.unity3d.com/questions/22088/i-cant-find-playerprefs-on-windows.html
Answer by bhayward_incrowd · Jun 15, 2016 at 11:24 AM
This is a known issue! Please kindly vote on the issue at the link below so that this can get fixed asap:
You'll notice that if you connect 3 monitors, the 2nd monitor will suddenly start working, and the 3rd will not. In other words, there is no issue for the first n-1 monitors, but the nth monitor will not work. When the nth monitor freezes you see the residual image of the last-rendered frame from the frame buffer.
Annoyingly, this is not an issue in the current stable release - BUT the current stable release only supports multi-monitors of equal dimensions. On the other hand, the latest beta release supports monitors of different dimensions, but has this bug referenced above!
Your answer
Follow this Question
Related Questions
Texture2D ReadPixels for specific Display 0 Answers
Why input.mousePosition addapting position with clicked display in editor but not in build? 0 Answers
Multidisplay Player Settings 0 Answers
UI interactables with multi display not working 0 Answers
Multi monitor with different resolutions and orientations? 1 Answer