Search Unity

UI and multiple displays

Discussion in 'UGUI & TextMesh Pro' started by casimps1, Feb 11, 2016.

  1. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    I updated the ticket and QA are working on testing the issue.

    However I have since spoken to the Input team and it seems that touch works different on non-primary displays.
    Non-primary display touch will be treated as a simulated mouse press, so OnMouseDown works but only for a single touch. The problem is the non-primary display windows are never registered with Windows to receive touch events.
    There has been some work to add this support, its still ongoing so hopefully will come in the future but I cant give an ETA at the moment.
     
    aalmada likes this.
  2. hikrebs

    hikrebs

    Joined:
    Oct 17, 2019
    Posts:
    6
    @karl_jones Hi,
    Do you know when Display.RelativeMouseAt will be supported on Linux?
     
  3. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    It should already be. I believe it was added last year. Have you tested it? What version are you using?
     
  4. hikrebs

    hikrebs

    Joined:
    Oct 17, 2019
    Posts:
    6
    I am using the unity version 2019.2.3f1 for Linux.
    I have 4 monitors (display 1 to 4) displaying fine the UI in each one. But as it is described here, only the clicks in the main monitor are working well, all others are redirected to the main monitor.
    Yes, I tested it and does not work. The next code always returns zero in x, y & z.
    Display.RelativeMouseAt(Input.mousePosition);
    What could be the problem?
     
  5. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Are you testing this in the Editor or a player build?
     
  6. hikrebs

    hikrebs

    Joined:
    Oct 17, 2019
    Posts:
    6
    In a player build.
     
  7. hikrebs

    hikrebs

    Joined:
    Oct 17, 2019
    Posts:
    6
    Hi @karl_jones,
    I am compiling and running the player build
    Do you have any hint?
    Do I need to configure something else in the settings to make it work in the player build?
     
  8. hikrebs

    hikrebs

    Joined:
    Oct 17, 2019
    Posts:
    6
    @karl_jones, any news about this issue on Linux (click on multiple displays)?
     
  9. hikrebs

    hikrebs

    Joined:
    Oct 17, 2019
    Posts:
    6
    Officially Display.RelativeMouseAt is still not working in Linux for the new versions of Unity. It only works for Windows until Unity 2019.2 (https://docs.unity3d.com/ScriptReference/Display.RelativeMouseAt.html) and it works only for Windows & MacOS with the new Unity 2019.3 & 2020.1 (https://docs.unity3d.com/2020.1/Documentation/ScriptReference/Display.RelativeMouseAt.html)
    So, last week, I solved the issue in Linux executing, since a C# script, a Linux command (using xinput and several parameters) to get the mouse coordinates in the whole screen (that includes all the monitors). Maybe you can add this type of solution to the Linux version of Unity.
     
  10. Dusk123

    Dusk123

    Joined:
    Jan 16, 2020
    Posts:
    7
    Has this issue been resolved in the latest version ?
     
  11. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    No, I don't belive it has.
    Touch support is something thats still being worked on as part of the new input system.
    You may have more luck asking the input team here https://forum.unity.com/forums/input-system.103/
     
  12. gthegamer

    gthegamer

    Joined:
    Sep 8, 2017
    Posts:
    3
    @karl_jones Hi I am creating a car simulator where I required to display the scene over 3 monitors, now each monitor resolution is 1920 x 1080 so i fixed the resolution from script to 5760 x 1080, which is 3x of 1920 and set the full screen to false and window type is maximized window, now when I launch the exe, the game is presenting fine on all 3 screens but the Ui only working on left monitor only but i need Ui to work on all 3 screens. Please help me on this...
     
  13. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Is this touch screen?
     
  14. gthegamer

    gthegamer

    Joined:
    Sep 8, 2017
    Posts:
    3
    no its not touch screen
     
  15. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    How does it not work? Mouse input?
    How is the desktop setup, extended?
     
  16. gthegamer

    gthegamer

    Joined:
    Sep 8, 2017
    Posts:
    3
    yes the mouse input is not working and the setup is extended, also my canvas of Ui render mode is screen overlay and reference resolution is 1920 x 1080
     
  17. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Could you please file a bug report?
    Its been a long time since I touched multiple display so I would need to see an example project to understand whats going wrong.
     
  18. fabiolamin

    fabiolamin

    Joined:
    Nov 25, 2018
    Posts:
    3
    Hi, guys! I am working on an application that needs 2 displays. In Windows build everything is ok, but in Linux, when the 2 displays have different resolutions, the UI events only happen in one display and some actions reflect on the second display. I am using the version 2020.3.16f1. Is there any bug fix for that? If not, how could I fix? Thank you! @karl_jones
     
    Last edited: Feb 22, 2022
  19. fabiolamin

    fabiolamin

    Joined:
    Nov 25, 2018
    Posts:
    3
  20. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Last edited: Feb 23, 2022
  21. fabiolamin

    fabiolamin

    Joined:
    Nov 25, 2018
    Posts:
    3
    Thanks for the reply, @karl_jones ! But like I said before, the Windows build is ok, but for Linux when the 2 displays have different resolutions, the mouse events don't work on the second display. Is there any fix for Linux platform?
     
  22. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    If its just Linux then is sounds like a different issue. Im not aware of any fixes or existing bugs for this, we would need a new bug report so we can look into it https://unity3d.com/unity/qa/bug-reporting
     
  23. akshays2

    akshays2

    Joined:
    Apr 16, 2020
    Posts:
    2
    Using New Input System, UI doesn't recognize any input (both mouse or touch) on a second display. Instead, mouse clicks on the second display will trigger a click on the main display at the same position. Any help would be appreciated.
     
  24. m4d

    m4d

    Joined:
    Jan 25, 2012
    Posts:
    27
    Wow, it boggles my mind that 6.5 years later this is still an unfixed issue not only in the now legacy input system, but also in the new one. This is just awful.
     
  25. Mr12Fingers

    Mr12Fingers

    Joined:
    Dec 26, 2012
    Posts:
    18
    I'm with you trying to figure this out too. Ugggg... how is this even a thing at this point?
     
  26. AndrewRoto

    AndrewRoto

    Joined:
    Jul 7, 2021
    Posts:
    10
    Having a similar issue.

    We work with prototypes interactives for museums. In our test lab we might have 3 or more monitors hooked up to a computer and need to remap displays. We move these monitors around a LOT, so we like to change the target display in app rather than in build and rebuild over and over.

    The issue is, that when we change display the second display is not accepting input. We're instead seeing the issue that @akshays2 describes where all input is sent to the first monitor and its UI. This is a huge slowdown for our workflow, is there any progress on the issue of second display input for UI?
     
  27. Stkst

    Stkst

    Joined:
    Jan 23, 2020
    Posts:
    1
    Any news on this one ? Still having this problem trying to setup multiple touch displays with multi touch. Multiple touch events work fine on the first display but on the second display touches are handled like mouse clicks. I Checked the input devices and it seems that only one touch device is registered as u said.
     
    geovor and IJsLauw like this.