Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Multiple Displays

Discussion in 'Editor & General Support' started by nainpk09, Mar 28, 2017.

  1. nainpk09

    nainpk09

    Joined:
    Sep 20, 2016
    Posts:
    1
    Hi i am using unity 5.4.1f1 personal addition and working on windows standalone build i want to use multiple displays in my game i have 2 cameras and set the target display of one camera to Display 1 and target display of second camera to Display 2. Also i have activated the display but Display.displays.Length is always one on editor as well as on build. So it dose not display any thing on second display. What should i do to display on second screen.
     
  2. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    If Display.displays.Length is just 1, then you can't use other screens. Something in Windows is telling Unity that you only have one monitor. It sounds like you are doing everything else correctly - first check the number of displays, if it's > 1 then activate the ones you want ( Display.displays[1].Activate(); )
     
  3. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Display.Length will always be 1 in the Editor. We dont have an implementation of display detection in editor as it works different. We are using Editor windows, not actual displays.
    You can still use multiple display in the editor you just dont need to activate the displays like you do in a release.
    What platform are you build to?
     
  4. Jean-Fabre

    Jean-Fabre

    Joined:
    Sep 6, 2007
    Posts:
    429
    Hi,

    Currently trying to make sense out of this Multi Display feature, it doesn't work for me, first screen is pushed to fullscreen but the second screen isn't filled up with the camera supposed to target the second screen. Is there a working sample project somewhere to rule out any misunderstanding or hardware incompatibility?

    I can sort of see at the launch that the second screen is rendered below the first screen on the same Application window, ( it's red when it doesn't work right?).

    and I can't make sense of the -multidisplay argument, what would be the right commandline on osX? none of the usual works it seems.


    Thanks :)

    Jean
     
  5. nuxvomo

    nuxvomo

    Joined:
    Jan 20, 2017
    Posts:
    12
    Hi Jean,

    Is there a PlayMaker function I can add to the Main Camera to activate Multi-Display?
    Having issues getting this to work.
    Kind of proud I've only used PlayMaker so far and no C# and would like to keep it that way :)

    Your assistance is always appreciated!
    Thanks!
     
  6. Jean-Fabre

    Jean-Fabre

    Joined:
    Sep 6, 2007
    Posts:
    429
    Hi,

    I was not able to make this work back then.

    All it should take is to set the target display of your camera. is it working for you if you just make that setup during editing? If it works for you and you need to switch display at runtime, I can make a custom action to let you change the display property of cameras, but first you need to make sure the feature is working as is.

    anyway, I don't think this multi display feature is mature nor reliable unfortunatly... It was a big issue for me at the time and I had to resort to multiple apps being ran at the same and connected via local network ( I had 6 screens to manage), but I am not sure your case would be ok with this technic.

    https://answers.unity.com/questions/1131106/possible-to-change-display-and-update-resolutions.html

    I'd love a clean resolution and explanation on how multi displays work and it's scope of control ( when full screen, how to deal with it at runtime, etc etc), so hopefully someone can share his experience on this.

    Bye,

    Jean
     
  7. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    704
    I also have to say, Unity Editor is so dumb and it doesn't work well with multi-monitor. It's been ages that it works like that. When I edit on the secondary monitor and new popup window goes to the left upper corner of the primary monitor and I miss noticing the popups and trying to bring the popups again and again.

    Are all Unity employees mandated to work on a single monitor? Otherwise, they should've noticed it years ago.
    Perhaps, they are all using MacBooks and it has never been an issue for them.

    There are so many simple little things like that makes me painful all the time.
    Saying will not help as they don't listen. Even if they listen, it will take months, if not years.
    It has to be mentioned in the keynotes a couple of times before it gets real.
    Please do a (good) job!
    Sigh..
     
  8. Jean-Fabre

    Jean-Fabre

    Joined:
    Sep 6, 2007
    Posts:
    429
    Hi,

    Well, I raised a ticket with them and they could not reproduce, and unfortunatly, I think it's enough for them to dismiss it, in all fairness. so the more bug report we make to them on that topic, the better as it will increase the chance for them to reproduce it and increase their level of awareness that this feature is buggy.

    I am on a macbook and I have this issue, so I think it's more complex than it looks.

    I don't think they behave like this in purpose, they have to prioritize somehow and of course it will impact negatively a fringe of the devs that wanted a resolution on these cases they dismissed. it's a tricky situation, and I would not be so harsh with the Unity QA team.

    also, I think you are confusing the feature, we are talking about a runtime feature where you set a camera to render to a target display ( 8 max) : https://docs.unity3d.com/Manual/MultiDisplay.html and what you are refering too seems to be the Unity editor layout feature :https://docs.unity3d.com/Manual/CustomizingYourWorkspace.html

    Bye,

    Jean
     
    karl_jones likes this.
  9. nuxvomo

    nuxvomo

    Joined:
    Jan 20, 2017
    Posts:
    12
    Hi Jean,

    I made it work for my situation by adding the following script to the Main Camera. I haven't dove in to making custom PlayMaker actions yet though. Would love to translate this eventually.

    Also, I'm just making mine for a demo but seems like it would be difficult to put in to production when displays are so varied in resolution and size. Would need to be able to scale based on the set up but I didn't get that deep. Just built it for the displays I'm using o_O
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class MultiDisplayActivate : MonoBehaviour
    6. {
    7.     void Start ()
    8.     {
    9.         if (Display.displays.Length > 1)
    10.             Display.displays[1].Activate(Display.displays[1].systemWidth,
    11.                                          Display.displays[1].systemHeight, 60);
    12.     }
    13. }
    14.  
    If you could create a PlayMaker action like this or better it would be a huge help to me and probably the community :)

    Thanks again,

    Jim
     
  10. JG-Denver

    JG-Denver

    Joined:
    Jan 4, 2013
    Posts:
    77
    Hi Jean,

    It actually looks like you are possibly experiencing the same issue as others of us, where multi-display is not scaling correctly on displays of different resolutions and this can affect UI hits as well.

    There are two issues in Issue Tracker for this, so you may want to vote for them:
    https://issuetracker.unity3d.com/is...ion-display-to-lower-resolution-displays-size
    https://issuetracker.unity3d.com/is...n-building-standalone-project-for-two-screens

    Here is another forum post on the same matter:
    https://forum.unity.com/threads/ui-and-multiple-displays.385525/#post-4662863
     
  11. rustinlee

    rustinlee

    Joined:
    May 31, 2014
    Posts:
    20
    It would be nice if the documentation made note of this.
     
  12. khuarizmi98

    khuarizmi98

    Joined:
    Mar 25, 2021
    Posts:
    6
    Hi karl, I'm using 8 display screen in my development. I have problem which is my game screen blank (like loading something) and after 10 min the game start to appear the game scene. I tried out not using multimonitor script (1 screen like default) and game not delay like 8 display. is it some kind of bug?
     
  13. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Try using the profiler to see what the delay is.