Search Unity

Bug Mouse click doesn't hit the correct button in some window resolution

Discussion in 'UGUI & TextMesh Pro' started by KimFlame, Aug 11, 2022.

  1. KimFlame

    KimFlame

    Joined:
    Aug 11, 2022
    Posts:
    1
    Hi,

    I create a project in Unity version 2021.3.6f1, and widnow resolution is 1920 x 540:
    001.png
    There are 100 buttons, and all text content is each button index and mouse position.

    At first it works perfectly in Unity Editor. But after the project build a window standalone exe, a bug is found.

    When I hit buttons before mouse position is (1441, any y), it work perfectly:
    002.png

    But when I hit buttons after mouse position is (1441, any y), it hits upper other button:
    003.png

    There is no any plugins in this test project, just ugui button. And if I change widnow resolution to 1920 x 1080, it works perfectly in window standalone exe:
    004.png

    I also test in other Unity version, then I find it works correctly before version 2021, and it works wrong in others.

    Here is my test project:
    https://drive.google.com/file/d/1tkf4ay36lFRzQ5d9rysOrWsUzp6H7ZFj/view?usp=sharing

    Please check it is a bug or not, thanks.
     
    Last edited: Aug 11, 2022