Search Unity

5.3 Multi-Display Feature Issues...

Discussion in 'Editor & General Support' started by Awesumo, Dec 8, 2015.

  1. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    What platform are you targeting? If it's windows only then the fix provided on the issue tracker will work, any other OS and it currently does not work. I will speak to the multiple display team next week(I'm away at the moment) and see what the latest is.
     
  2. Rational-MA

    Rational-MA

    Joined:
    Mar 6, 2015
    Posts:
    59
    @karl_jones we are targeting Windows standalone. If it is even close to a solution, even for windows standalone, then having the UI team apply it to an upcoming patch would be huge! Thanks for looking in to it!
     
  3. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Thats strange. Windows standalone should work fine with multiple display and UI, its the only platform that does. Can you describe the problems you are having, do you have a sample project?
     
  4. Rational-MA

    Rational-MA

    Joined:
    Mar 6, 2015
    Posts:
    59
    @karl_jones I retested and figured out that our scenario (where user can choose which monitor to target) works if you put the target canvas to "Screen Space Overlay" mode and set the canvas targetDisplay.

    However, we have a our target canvas in "Screen Space - Camera" and we set the camera's targetDisplay, when you do this, the visuals do move over, but you can no longer interact with the UI.

    Was this intentional? Or should it also work with the way we set it up?

    I am attaching the scene and controller code as a package to this post. In it, there are reference main display buttons and we start our our secondary ui camera on the main display. Then there's a field to type in monitor index and a button to then switch the secondary camera's target display to the number you typed in. (all your monitors get activated in this test scene).
     

    Attached Files:

  5. Rational-MA

    Rational-MA

    Joined:
    Mar 6, 2015
    Posts:
    59
    @karl_jones in addition to information in the above post and tests, i can't get world-space UI interactions to work either.

    so what i'm seeing is...(regarding ui interactions)

    Screen Space Overlay and canvas' targetDisplay is other monitor = working
    Screen Space Camera and target camera's targetDisplay is other monitor = NOT working
    3D object with a World Space Canvas with the rendering camera's targetDisplay is other monitor = NOT working

    Also to be clear, this is with official unity build/patches (using 5.5.1p4). This does not include any posted custom code from that bug tracker issue.
     
    Last edited: Mar 1, 2017
  6. antifuzz

    antifuzz

    Joined:
    Feb 22, 2013
    Posts:
    99
    @karl_jones Does multi-display on Windows 10 currently work with multitouch touchscreen input?
    Any issues or limitations I should be aware of? Weighing up whether to try this route or go with two networked instances for a museum application.
     
  7. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    This is the multi display input code for the GraphicRaycaster
    Code (CSharp):
    1.            int displayIndex;
    2.             if (canvas.renderMode == RenderMode.ScreenSpaceOverlay || !eventCamera)
    3.                 displayIndex = canvas.targetDisplay;
    4.             else
    5.                 displayIndex = eventCamera.targetDisplay;
    You can see that we use the canvas target display when canvas mode is Screen space or no event camera is supplied.
    I suspect it is using the wrong eventCamera or can not find one.

    Code (CSharp):
    1.         public override Camera eventCamera
    2.         {
    3.             get
    4.             {
    5.                 if (canvas.renderMode == RenderMode.ScreenSpaceOverlay
    6.                     || (canvas.renderMode == RenderMode.ScreenSpaceCamera && canvas.worldCamera == null))
    7.                     return null;
    8.  
    9.                 return canvas.worldCamera != null ? canvas.worldCamera : Camera.main;
    10.             }
    11.         }
    Make sure the canvas has the camera that is rendering it assigned to the worldCamera slot.
     
  8. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Touch and mouse input is converted the same way with regards to Multi display so it should work fine. Unfortunately I dont have access to any Windows touch devices to try it for myself but if you do have any problems let us know.
     
    antifuzz likes this.
  9. Rational-MA

    Rational-MA

    Joined:
    Mar 6, 2015
    Posts:
    59

    @karl_jones I've verified this and just can't get the UI interactions to work on the second display. I've attached to this post a new project from scratch using 5.5.2p4, The scene will activate all your monitors (in a build, not editor) and puts a button on the main display and display 2. Each display has a canvas and each canvas has a screen-space-camera settings. Main display has a camera, display 2 has a camera.

    In addition, while in the editor, the game view targeted to display 2 won't interact either.

    This is with windows standalone. Please try out this project, and try it out in a build also and I hope you can see what we all are seeing with this setup using screen-space camera
     

    Attached Files:

  10. KnightRiderGuy

    KnightRiderGuy

    Joined:
    Nov 23, 2014
    Posts:
    515
    Gawd dam it!! It Looks like not only has the latest version of Unity NOT fixed the blasted Buttons clicking on Dual screens but also in their infinite wisdom have yet again messed up the Arduino connectivity.... Common people, get your crap together!!!! :mad::mad::mad::mad::mad::mad:
     
  11. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    862
    I am experiencing a consistent multidisplay crash when the player is set to Linear. It happens exactly when Display.displays[1].Activate() is called. If I change the mode to Gamma the player works fine.

    It happens in both Unity 5.6.0f3 and the new Unity 2017.1.

    Please let me know if anyone can reproduce this crash. I have attacted the project.

    ~ce


     

    Attached Files:

  12. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Have you filed a bug report?
     
  13. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    862
    Yup. And your colleagues wrote back in less than an hour that they succeeded in reproducing the bug. Pretty cool!! I hope it will be easy to fix.
     
    m4d and karl_jones like this.
  14. BonsaTech

    BonsaTech

    Joined:
    Dec 22, 2015
    Posts:
    73
    I´m trying to improve an old game performance that runs in 3 monitors with a resolution of 5760x1080 and I´m starting to use the multi-display system (I´m using Unity 5.6.0f3).

    When I launch Fraps, the FPS counter appears on the 3 monitors, everyone showing 100 FPS more or less (I´ve disabled the VSync). Are these values correct? Every instance is running with this performace or is it the global value (Performance1+Performance2+Performance3 / 3)?
     
  15. KnightRiderGuy

    KnightRiderGuy

    Joined:
    Nov 23, 2014
    Posts:
    515
    karl_jones Currently on the dual screens this just shows up on display one, should it not show up on display 2 as well?
    BTW When published on Windows 10 you can click on the screen buttons in each screen just fine, seems to only not work in the editor when running with the two game tabs which is annoying but at least it works as a published file in the stand alone player.
     
    Last edited: May 26, 2017
  16. BonsaTech

    BonsaTech

    Joined:
    Dec 22, 2015
    Posts:
    73
  17. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Can you describe your problem? There have been no multiple display fixes that I am aware of. Is the problem the input not being able to distinguish between displays, for that issue platforms must implement the input for multiple display input to work and at the moment the only one that does this is Windows. Linux and OSX still need to be done.

    Edit: The Linux and OSX teams have agreed to start work on adding input. So hopefully that will be available in the near future.
     
    Last edited: Jul 20, 2017
  18. BonsaTech

    BonsaTech

    Joined:
    Dec 22, 2015
    Posts:
    73
    " Is the problem the input not being able to distinguish between displays"

    Yes, I press the button on the display 1 and the button on display 2 is pressed.

    "for that issue platforms must implement the input for multiple display input to work and at the moment the only one that does this is Windows"

    Yes, we are running on windows standalone x64.

    This seems to be a known issue: https://issuetracker.unity3d.com/issues/ui-receives-events-from-a-different-display-in-editor
     
  19. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    It should be working on windows standalone builds. It won't work in the editor though as the editor does not support multiple display input, it's basically another platform and implementing in Editor requires more thought as it's possible to have multiple windows with the same display id but different positions and sizes etc. So it's not as simple.
     
  20. BonsaTech

    BonsaTech

    Joined:
    Dec 22, 2015
    Posts:
    73
    Ok, we´ll try the build. There isn´t a workaround for the Editor, is it?
     
  21. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
  22. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Quick update so you know this has not been forgotten!
    We are just about to land multiple display input support for OSX, it should be available in 2017.3 :)
     
    BonsaTech and cecarlsen like this.
  23. greg-harding

    greg-harding

    Joined:
    Apr 11, 2013
    Posts:
    524
    Great news... for 2018 :)
     
    karl_jones likes this.
  24. Davide1104

    Davide1104

    Joined:
    Jun 12, 2013
    Posts:
    38
    So, is there any news About multiDisplay ? o_O
     
  25. lumeneo

    lumeneo

    Joined:
    Mar 3, 2014
    Posts:
    60
    Thrilled to see that this is being handled! Please make sure multi-display control will:
    - Go full screen without distorting view. Currently, I have to resize the window to the full screen size, then switch to full screen.
    - Go full screen on a single display, instead of just blacking out other displays.
    - Allow for changes in displays (resolution, number of displays available), etc
    - Allow for runtime changing of number of displays. Currently, I have to set the number of displays and then restart.
    - Provide locations of all displays (as set in the Displays settings in OS X), so I know which display is where, in relationship to the other ones.

    Thanks soooo much!!!
     
  26. BonsaTech

    BonsaTech

    Joined:
    Dec 22, 2015
    Posts:
    73
    Anyone knows the answer to this questions about FRAPS?
     
  27. KnightRiderGuy

    KnightRiderGuy

    Joined:
    Nov 23, 2014
    Posts:
    515
    OK rant time!!

    just when it seems the issue with the dual displays was all working fine, albeit not in the editor.

    Now it seems that after some update of some kind snuck in under the wire in a build now the buttons do not work on display 2 whereas they did prior to whatever sneaky update has pooched them....

    Anyone else now having this issue???

    is there a fix for this annoying issue??
     
  28. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    What version have you upgraded from and to?
    We recently added multi input support to OSX so it could be due to that.
     
  29. KnightRiderGuy

    KnightRiderGuy

    Joined:
    Nov 23, 2014
    Posts:
    515
    I'm using 5.6.0 that being said I do not recall it asking me to do any sort of update, outside of the automatic ones which I suspect must have changed it. like I say it was working perfectly on the 2nd screen and then afterwards nada.

    Running on a Windows 10 OS on the Alienware Steam machine.
     
  30. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Im not sure I understand. Did you recently download an updated version of the Unity editor or has it just stopped working with the same version?
     
  31. KnightRiderGuy

    KnightRiderGuy

    Joined:
    Nov 23, 2014
    Posts:
    515

    Yes, the latter as near as I can tell.... so I'm not sure if Unity snuck in some sort of update that it did not ask me for or if it was a Windows update?? All I know is the buttons on the 2nd display were all working fine (Not in the editor though, that has never worked)
    And then suddenly when I published out my latest build to go and test it out on our mini dual displays I could not click the buttons on display two.... and the touch for display 2 does work as I can click and open folder and anything else from screen 2 so I know it's not the touch part of it.??

    just FYI Between Windows updates and Unity updates it makes developing our project ridiculously impossible...!!
    Seems just when we get one issue solved up pops a bunch more.
    our music player part of the project we had got all worked out for instance and now because of some sort of depreciated value it no longer works....!! one damned thing after another.... REALLY slows the development down for us running into all of these issues! :(
     
  32. KnightRiderGuy

    KnightRiderGuy

    Joined:
    Nov 23, 2014
    Posts:
    515
    Hey Karl, just a thought here but I had set up a series of screen transition animations to make the loading of the 2nd screen more nicer looking, basically they are just an animation that animates an image to fill the screen and then reverses the animation to reveal the screen, is it possible that this could cause the buttons on screen two to no longer work??
    I can't see it but just throwing this out there as I'm REALLY stuck on this. :(
     
  33. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Yes that sounds like the likely culprit. Maybe turn of raycast target on the objects you use or make sure to disable them completely after use
     
  34. KnightRiderGuy

    KnightRiderGuy

    Joined:
    Nov 23, 2014
    Posts:
    515
    Well, I took a very close look at how the animation is working and it's images for each frame are inside of an empty game object, once the animation has completed none of the images/frames are active so nothing is covering the buttons so I can't see that being the problem... I thought for a moment it might have been but then I realized I have the same animation opens the main screen up to visible and all of those buttons work, both screens use the same prefab for the animation I use for screen transitions.
    I'm REALLY at a loss here??
     
  35. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    If you do ToString on the event system it should provide info such as what object the touch/mouse is over. See if that gives any clues
     
  36. KnightRiderGuy

    KnightRiderGuy

    Joined:
    Nov 23, 2014
    Posts:
    515
    Thanks Karl,
    Do you have an example of how to do that?

    Oh I did set up a Test Canvas and Camera on the 2nd screen just simply switching over to those to see if I could press a button on that screen's test canvas that simply activates a text that says "You pressed a button" and that did work so my guess Is I must have either something in my code that is messed up or somehow the button clicks are being blocked by something??
     
    Last edited: Feb 7, 2018
  37. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Some script that does something like this should work:

    Code (CSharp):
    1. void OnGUI()
    2. {
    3.     var e = GetComponent<EventSystem>();
    4.     GUILayout.Label(e.ToString());
    5. }
     
    KnightRiderGuy likes this.
  38. KnightRiderGuy

    KnightRiderGuy

    Joined:
    Nov 23, 2014
    Posts:
    515
    OK Thanks Karl.
    I did manage to stumble onto what the problem was today, as it turns out the very first frame of my screen transition animation I'm figuring must have been blocking the buttons on the other canvases and cameras.... which seems a bit daffy but as soon as I changed the Ray Cast Target to unchecked I was then able to press the buttons on display two.... weird.
     
    karl_jones likes this.
  39. SimumakDevs

    SimumakDevs

    Joined:
    Feb 13, 2018
    Posts:
    11
    Does Multi-Display force the VSync to be enabled?
     
  40. Andrey37

    Andrey37

    Joined:
    Oct 25, 2018
    Posts:
    6
    Hello! I also have a problem with Canvas with multi-display on Windows and Mac OS - Unity3D ver 2018.2.11f1 Tell me, did you decide this error or not? I would like to ask you to see the full Instruction how to fix this problem.
     
  41. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    862
  42. Arthur-LVGameDev

    Arthur-LVGameDev

    Joined:
    Mar 14, 2016
    Posts:
    228
    We can't seem to get this working either -- it loads the secondary display when in a build running on Windows, but the mouse position via GraphicRaycaster are off. It seems to have to do with having the displays at differing resolutions or similar; we've played with it only in Screen Space but have indeed tried both modes (Camera & Overlay). No joy. =(

    Searched pretty thoroughly and only came across this bug, which does sound pretty much exactly like what we're seeing as well. https://issuetracker.unity3d.com/is...-and-do-not-interact-in-dual-display-projects

    Is this still an issue for others? Was hoping to get some mutli-display support goodness into our game, but after several days on it so far seems like it's still just not working correctly (on latest macOS the secondary display doesn't come up at all even)...

    Any guidance potentially, @karl_jones ? =D
     
  43. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Hm
    Could you file bug reports for the issues please? I'm not sure about the osx issue, it could be a regression. Unfortunately we have no automated testing for multiple displays, its something I'm working on addressing at the moment.
     
  44. Arthur-LVGameDev

    Arthur-LVGameDev

    Joined:
    Mar 14, 2016
    Posts:
    228
    Yeah, will copy our 'minimal repro scene' out into its own project and submit it + post case number here in the next couple of days.

    Gotcha, makes sense regarding tests; is understandably probably a pretty tough one to write automated tests for, though glad to hear you're working on it at least. It'll probably prove to be quite valuable to catch these kinds of regressions right away, especially since they're probably equally difficult to test/debug. Looking forward to seeing it be stable for sure. :)

    Which makes me wish we had an extensive test suite for our game too, hah! Especially after chasing gameplay bugs down for weeks straight, it's sure a comforting and cozy thought. =D ;)

    Just to clarify further, on macOS the second display window never comes up. On Windows it does come up but the GraphicRaycaster is producing inaccurate coordinates; we started hacking away at GraphicRaycaster and could probably make it work, but ended up putting it down as I'd rather not deviate & have to re-do/merge the upstream/face issues later, especially on such a key component of our game's UI.

    Anyways, all tests were run in builds of course. We're using 'Screen Space - Overlay' (though did also try with 'Screen Space - Camera'); we were attempting to display UI via a canvas dedicated solely to the secondary display, with nothing else displayed on it aside from that Canvas. It renders fine, and functions OK too once you know what the 'offset' is / where to click to hit things. =D

    Will report back with a case number. Thank you for the prompt response and again, very happy to hear that you'll be bolstering the support via test suite. Ty!
     
    FutureVisual and karl_jones like this.
  45. yezzer

    yezzer

    Joined:
    Oct 30, 2009
    Posts:
    143
    Any update on this issue? We've run into the offset bug on UI on a second display too. Windows, 2018.3.10f1.
     
  46. Arthur-LVGameDev

    Arthur-LVGameDev

    Joined:
    Mar 14, 2016
    Posts:
    228
    I admittedly never got the minimal repro project submitted; which means it's probably my fault if this hasn't moved at all since then, even if indirectly.

    FWIW -- We basically just decided to put multi-display features on hold. It seemed likely we could write our own GraphicRaycaster as a kludgey workaround for the issue but it wasn't worth doing in our case. This is especially true in our case; it's not an integral part of our game, is only intended to allow for "management UIs" to be moved back/forth between secondary displays for a small segment of our player base (power users/players).

    If it does eventually 'just work' out of the box on both Windows & Mac then we may pursue it further at that point, though. As of the last time we worked on it (approximately when I last posted on this thread) it had the 'offset' issue on Windows and I don't believe we even got secondary displays to Activate() correctly on Mac at all. =(

    @yezzer -- If you have the time, I'd be happy to delegate minimal repro duties over to you; or perhaps @karl_jones team has already done so? =D
     
    yezzer likes this.
  47. yezzer

    yezzer

    Joined:
    Oct 30, 2009
    Posts:
    143
  48. Arthur-LVGameDev

    Arthur-LVGameDev

    Joined:
    Mar 14, 2016
    Posts:
    228
  49. leutnant_kane

    leutnant_kane

    Joined:
    Apr 29, 2015
    Posts:
    40
    Sry for the necro, but this issue is still very much relevant

    https://issuetracker.unity3d.com/is...83.302671197.1638872169-1176195476.1634821550

    The won't fix description basically just says its been broken forever, though luck.

    But Unity is not just games anymore and we can't very well tell all our customers that they have to set their big 4k monitors to the same resolution and display scaling as their docked office laptops (often full-hd or even less on small display sizes), because otherwise unity can't deal with multiple monitors?

    @karl_jones Is there any chance you guys would reconsider your won't fix stance on this? I really think there are lots of companies making business appplications (like ours) having a real need for proper multi-window and multi-monitor support.
     
    MS80, cecarlsen and Noisecrime like this.