Hello unity forumers, I have a fully functioning multi-display system. When ever it is running, it auto-maximizes the screens on both displays. This causes one major issue because it removes the frame around the player (the frame with the minimize, maximize, and exit button in the top right corner). I need to be able to get that frame back around the main player window and am not sure how to make that possible. If anyone one has a solution or suggestions please share. Thank you! Regards, BD
@karl_jones any thoughts on this since you are familiar with my previous posts. i.e. http://forum.unity3d.com/threads/how-to-multi-display-resizing-display-2.398376/
Funny you should ask, I have been studying how md works the last few days I'll have to check but I'm fairly certain it's not possible to run in windowed mode in md. How are you activating the displays?
Sent a PM with all the code from my display system. If anyone else is interested, then I will share snip-its here.
@karl_jones , An alternative to windowed mode in MD would be to do a reset on the display system so that way display 2 is deactivated again. When I leave the scenarios that require MD I return to the start screen. Is there a way to call a reset on the unity system? What we are trying to avoid is the user having to quit the player in order to have function single display lessons after having completed a MD lesson. Hopefully: Display.displays[1].DeActivate(); is added and supported in the future.
I'll reply here to above and your PM so everyone can benefit. I noticed you are using renderingWidth/renderingHeight, I fixed a problem with that yesterday. It was returning the system height/width not rendering so this may cause issues if they are not the same. I also fixed a bug with getting the mouse cursor not working outside of the main display, this will work in the future once the fix comes out (2~ weeks). At the moment it is not possible to disable MD once it is activated, i'll investigate how feasible it is although the MD code is something I have only just started to look into so i'll need to ask one of the other devs. I have also noticed that setting the resolution through the Activate function seems to provide better results than using SetParams when starting up. As I said i'm still learning this area, i'm in the middle of writing a blog post on it to help provide example etc but it's still early days. Karl
Go @karl_jones ! @BisuDagger gets super excited when you provide help to him and he's KIND OF AN ogre.... so thank you for making him happy and helping him
Any news on this? I'm looking for the same result as BisuDagger; being able to run windowed on the primary monitor while having one or multiple external monitors in full screen.
Hi. No this is not currently supported. We are looking to improve the multiple display system but no eta yet.
@karl_jones thank you for keeping up with this thread. Is there anyway way we can get access to deactivating multidisplay? Returning the screen to single display mode is a necessity for me. Even seeing the hidden code that activates multidisplay would be a huge help. This is putting a halt on a major project of mine and it actually has recently prevented a product from being shipped.
Hi, At the moment we dont have any built in support for disabling a display once it's activated. On windows we use CreateWindowEx. It looks like we do disable the display if we lose the device, maybe there is a way to force it to disable? I dont think its going to be possible to workaround at the moment though. I have not tried this but perhaps you could move the display offscreen using SetParams and disable its camera so its inactive?
I actually had a big win this morning after posting here. https://www.assetstore.unity3d.com/en/#!/content/30563 This unity store asset has a call "Window.Border()" that resets the sim and returns the boarder to the window. It fits perfectly with my case scenario where the user will leave a lesson and return to the start screen anyway. This is a super useful plugin for anyone needing it in the future.
Not at the moment (other than running 2 instances of Unity). I suggest you add any feedback, feature request to here http://feedback.unity3d.com/ We want to improve the multi display support so this will help us put together our roadmap in the future.
Hi, It's not currently on our roadmap. The multiple display system needs a big overhaul before we can start adding new features.
Hi, ok, as i understood its not possible to have one screen on "window mode" and the other screen on "fullscreen mode". But is it possible to have both on windowed mode or means several displays always full screen mode? Thanks for the info! Cheers, Marc
No when using multiple display they are all full screen. It would be nice to support this in the future but no plans at the moment to do so.
Hey karl_jones, actually i found a solution to get multiple displays in "windowed" mode. It works even with one fullscreen and one windowed display. At the end I needed two displays in window mode so i set up three displays on my Computer. In my Unity scene i set up 2 Cameras and subscribed them to display 2 and 3. One of my 3 displays is empty. With this i get two displays in windowed mode. In a script on a gameobject is just said: Code (CSharp): using UnityEngine; using System.Collections; using System; using UnityEngine.UI; public class DisplayScript : MonoBehaviour { int width = 1730; int height = 570; int xpos = 130; int ypos = 240; int width2 = 1920; int height2 = 1000; int xpos2 = 0; int ypos2 = 0; void Awake() { if (Display.displays.Length > 1) { Screen.fullScreen = false; Display.displays[1].SetParams(width2, height2, xpos2, ypos2); Display.displays[1].Activate(width2, height2, 60); } if (Display.displays.Length > 2) { Screen.fullScreen = false; Display.displays[2].SetParams(width, height, xpos, ypos); Display.displays[2].Activate(width, height, 60); } } } I am on Unity 2018.2.6f1
Hey, i am not sure, but you can test the code above setting the display[0] to "Screen.fullscreen = true". Good luck.
Has anyone managed to make the X and Y coordinates of the windowed displays work?? It doesn't work here on either 2021.3.25f1 or 2022.3.17f1. I have a simple scene in a URP project with 3 cameras assigned to Displays 1/2/3. I run this on my laptop connected to a total of 3 displays and the width/height are respected, but not XY coordinates. My script is here: Code (CSharp): using UnityEngine; public class DisplayScript : MonoBehaviour { int width = 800; int height = 600; int xpos = 10; // X and Y don't work! int ypos = 20; // X and Y don't work! int width2 = 640; int height2 = 480; int xpos2 = 30; // X and Y don't work! int ypos2 = 40; // X and Y don't work! void Awake() { if (Display.displays.Length > 1) { Screen.fullScreen = false; Display.displays[1].SetParams(width2, height2, xpos2, ypos2); Display.displays[1].Activate(width2, height2, 60); } if (Display.displays.Length > 2) { Screen.fullScreen = false; Display.displays[2].SetParams(width, height, xpos, ypos); Display.displays[2].Activate(width, height, 60); } } } In 2022.3.17f1 the API has changed a bit but the results are the same, it still doesn't work: Code (CSharp): using UnityEngine; public class DisplayScript : MonoBehaviour { int width = 800; int height = 600; int xpos = 10; // X and Y don't work! int ypos = 20; // X and Y don't work! int width2 = 640; int height2 = 480; int xpos2 = 30; // X and Y don't work! int ypos2 = 40; // X and Y don't work! void Awake() { RefreshRate r = new RefreshRate(); r.numerator = 60; r.denominator = 1; if (Display.displays.Length > 1) { Screen.fullScreen = false; Display.displays[1].SetParams(width2, height2, xpos2, ypos2); Display.displays[1].Activate(width2, height2, r); } if (Display.displays.Length > 2) { Screen.fullScreen = false; Display.displays[2].SetParams(width, height, xpos, ypos); Display.displays[2].Activate(width, height, r); } } }