Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Bug UIToolkit Button Click Area Issue Non-Native Resolution

Discussion in 'UI Toolkit' started by MousePods, Nov 16, 2023.

  1. MousePods

    MousePods

    Joined:
    Jul 19, 2012
    Posts:
    812
    Hi,

    I found a bug in 2023.3.12f1.

    This is NOT an issue on your set native resolution. (Mine is the resolution of iPad Pro 2018)

    On a non-native resolution (I tested on a iPhone 15 Pro and iPhone XS), UIToolkit buttons will not be clickable (or will not respond every time) in certain areas.You can either build it or just connect your phone to your pc and use the Unity app to stream it to your phone.

    I reported this bug: IN-60941

    I was wondering if this is a known issue and if there is a workaround?



    Thanks!
     
  2. MousePods

    MousePods

    Joined:
    Jul 19, 2012
    Posts:
    812
    The bug was approved, but QA said it was due to constant size not scale with screen. However, this is incorrect as I never use constant size. Here is another video on 2 devices of it not working.

    iPhone 8 Plus and iPhone 15 Pro.

    For some reason, the 8 can be clicked constantly at the bottom of the button, but the 15 cannot.

     
    Last edited: Nov 20, 2023
  3. MousePods

    MousePods

    Joined:
    Jul 19, 2012
    Posts:
    812
    Is there any information on this? I am very worried it won’t get fixed because of the wrong information.

    Also, is there any workaround? I am worried this bug could take a long time to fix possibly like the :hover bug (that is over 6+ months waiting to get fixed). :(

    Thanks!
     
  4. MousePods

    MousePods

    Joined:
    Jul 19, 2012
    Posts:
    812
    Just bumping this after the holidays.

    I am worried as nobody has responded about the misinformation on the bug report.
     
  5. FreddyC-Unity

    FreddyC-Unity

    Unity Technologies

    Joined:
    Jun 9, 2021
    Posts:
    46
    Hi, thank you for filling the bug.

    I can see the bug has made its way into our backlog. While we can't make any promises that this will be immediately looked at, we hope to address this issue in the upcoming months.

    In terms of workarounds, perhaps if we can get a bit more information we might be able to come up with one - even though from reading the issue, it might be complicated to provide one. May I ask, using the scale with screen size, when tapping on the button, do know if:
    1. are there any error(s) or warning(s) in the console?
    2. is the PointerDownEvent being execute?
     
  6. MousePods

    MousePods

    Joined:
    Jul 19, 2012
    Posts:
    812
    There are no warning and PointerDownEvent is not begin called, nor is clickevent.

    I think I found more information that is more helpful.

    iPhone 8 - Has no issue. I made a mistake.

    iPhone 15 Pro - Will not click in lower part of button



    iPhone XS - Will click in lower part of button but not consistently, You sometimes have to click multiple times to get it to trigger. NOTE: You can hold a finger in the lower part of the button and it will not register immediately but if you keep holding it will eventually trigger.

     
    Last edited: Jan 12, 2024
  7. MousePods

    MousePods

    Joined:
    Jul 19, 2012
    Posts:
    812
    I did some more research and this seems like a critical bug that will affect a lot of people.

    Code (CSharp):
    1.         if(Pointer.current != null && Pointer.current.press.wasPressedThisFrame)
    2.         {
    3.             print(Pointer.current.position.ReadValue());
    4.         }
    5.  
    Using Unity Remote 5, clicking at the bottom of my iPhone 15 Pro, it will not register a click until around y: 34. However, if I use the mouse, I can get a click at the edge of the screen y: 0.

    It is impossible to work around this type of bug? It seems to have to do something with the homebar as this isn't an issue with iPhone 8 Plus.
     
    Last edited: Mar 23, 2024
  8. MousePods

    MousePods

    Joined:
    Jul 19, 2012
    Posts:
    812
    @FreddyC-Unity Just wondering if there is an update with this bug? Seems like a critical bug that cannot be workarounded as there is no clicks received in the lower part of the phone.
     
  9. uBenoitA

    uBenoitA

    Unity Technologies

    Joined:
    Apr 15, 2020
    Posts:
    224
    Hi MousePods,

    Thank you for submitting so much information, it really helps us a lot in pinpointing what the exact problem is. As far as I understand it, it happens with the Input System package raw data, not just UI Toolkit, so it must be something on the Input side of things. I've relayed this post to the Input team to see if they're aware of it and have some status on the situation.
     
    MousePods likes this.
  10. MousePods

    MousePods

    Joined:
    Jul 19, 2012
    Posts:
    812
    I might have some more information. I was testing another game of mine on my iPhone 15 Pro. I have a visual element that bocks interaction at the top of my screen. I highlighted it as a red square.

    The red square blocks input to a button below that starts the game. When I press right at the top of the red square, the game will start. Of course, when I press at the bottom of the phone, the game won't start because of that bug.

    It seems like...probably not the case...but that the raw data is flipped. Pressing at the top of the screen triggers pressing at the bottom of the screen?

    This seems very weird but I am just putting it out there just in case

    Screenshot 2024-02-24 at 11.55.35 AM.jpeg
     
  11. MousePods

    MousePods

    Joined:
    Jul 19, 2012
    Posts:
    812
    Hi,

    I was wondering if there is any new information on this? I really want to launch my app but I cannot due to this bug. Is there any hope that it will be fixed in the next month or two?

    Thanks!
     
  12. MousePods

    MousePods

    Joined:
    Jul 19, 2012
    Posts:
    812
    Any Unity dev,

    Should I report this issue again as the title and description that QA did is wrong? Also my description was wrong as I found the real issue reported in this thread?