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.

UI within 80 pixels of the right edge of screen has colliders that don't work

Discussion in 'UGUI & TextMesh Pro' started by cgrow67, Jul 7, 2022.

  1. cgrow67

    cgrow67

    Joined:
    May 31, 2016
    Posts:
    52
    We always keep a toolbar running down the right edge of the screen.

    Recently I did a code build using 2021.3.5f1 to Windows x64.
    When the product started up, I noticed the UI on the right edge were not detecting collisions.
    None of the buttons work and neither does a slider we keep on the right edge.

    When using the product inside Unity everything works great.
    Only when you do a build does it fall apart.

    As you move UI elements off the right edge of the screen, collisions start working.
    At about 80 pixels everything is good in built code.
    Sadly, its very ugly.

    This is a really odd combination.

    Anyone seen anything like this?

    Chris
     
  2. cgrow67

    cgrow67

    Joined:
    May 31, 2016
    Posts:
    52
    I added a nice fat TMP button on the right edge of the screen.

    In the editor everything works just fine.
    When compiled, you can see the collider doesn't work on the right half of the button but does on the left half.