UIToolkit Button Click Area Issue Non-Native Resolution

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?

vw36m8

Thanks!

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.

8x0xpb

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). :frowning:

Thanks!

Just bumping this after the holidays.

I am worried as nobody has responded about the misinformation on the bug report.

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:

  • are there any error(s) or warning(s) in the console?
  • is the PointerDownEvent being execute?

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

vfmzl4

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.

zhl4v4

I did some more research and this seems like a critical bug that will affect a lot of people.

        if(Pointer.current != null && Pointer.current.press.wasPressedThisFrame)
        {
            print(Pointer.current.position.ReadValue());
        }

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.

@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.

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.

1 Like

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

9662423--1375871--Screenshot 2024-02-24 at 11.55.35 AM.jpeg

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!

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?

Hi @MousePods ,
We seem to experience the same issue. Did you get any reply from Unity?

Here is the ticket: Unity Issue Tracker - [iOS] Pointer class does not detect touches when tapping near the edge of the Screen

I gave up on Unity fixing it tbh =/