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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Button click area being separated from simple button.

Discussion in 'UGUI & TextMesh Pro' started by dustinpb, Jun 29, 2022.

  1. dustinpb

    dustinpb

    Joined:
    Jun 9, 2022
    Posts:
    3
    Reproduction steps
    • Create a new project
    • Right click in hierarchy and select to add a TextMeshPro button
    • Move the button to the top right corner and anchor the button to the top right
    • Verify your button works in editor
    • Go to build options and enable resizable window
    • Build and run project
    • Verify button works in fullscreen mode
    • Switch to windowed mode and resize screen to be vertically smaller (should look widescreen on one monitor)
    • Observe the button is now unclickable
    • Move mouse below button and try to find the hover/click area. It should be somewhere below the button hoverissue.gif
    Gif shows first fullscreen mode, then windowed mode where the window fills the screen, then a resized window where the button breaks.
     
    xucian and kmowers like this.
  2. dustinpb

    dustinpb

    Joined:
    Jun 9, 2022
    Posts:
    3
    Anchoring to the top right is not necessary. This bug will affect all buttons on the right side of the screen in windowed mode regardless of anchoring position. The effects become more severe the more the window is shrunk down vertically. This does not effect buttons in the center or left side of the screen.

    Tried to upload a zipped project file, but looks like file size is too big for the forums.
     
  3. duanhuifeng

    duanhuifeng

    Joined:
    Jun 17, 2022
    Posts:
    1
    I also had the same problem。
     
  4. Barry100

    Barry100

    Joined:
    Nov 12, 2014
    Posts:
    200
    Hi all. I ma having this exact issue. I put a button in top right corner and so on. Even if I child it to any element it still happens. Weird thing is, it only happens with 1 button. The rest work as expected. Has anyone got any way to fix this?
     
  5. dustinpb

    dustinpb

    Joined:
    Jun 9, 2022
    Posts:
    3
    xucian and kmowers like this.
  6. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    764
    didn't expect this to be an actual unity bug, but I just googled as the last resort, and boom! nice, I mean "nice" :D