Search Unity

Bug Mouse input does not work on right side of screen in windowed build

Discussion in 'UGUI & TextMesh Pro' started by keenanwoodall, Aug 17, 2022.

  1. keenanwoodall

    keenanwoodall

    Joined:
    May 30, 2014
    Posts:
    598
    This was a doozy to figure out!

    In windowed builds, the uGUI input does not work on the right side of the screen. The area affected increases as the aspect ratio of the window increases.

    I tracked the issue down to MultipleDisplayUtilities.RelativeMouseAtScaled which is used when raycasting to do coordinate scaling to compensate for multiple displays or something, but it seems to be scaling the mouse coordinates out of the camera's viewport so raycasts return early even though the cursor is over the window.

    I referenced some of the scaling math to visualize where the inputs become invalid in red. As you can see, clicking and hovering has no effect on the example buttons.

    Bug report created at CASE IN-14210

    Example.gif
     
    BlancNeige likes this.
  2. wanderw

    wanderw

    Joined:
    Dec 8, 2014
    Posts:
    5
    I have the same problem, hope it can be fixed soon
     
  3. keenanwoodall

    keenanwoodall

    Joined:
    May 30, 2014
    Posts:
    598
    Temporary solution posted here
     
  4. wanderw

    wanderw

    Joined:
    Dec 8, 2014
    Posts:
    5
    Okay, thank you very much