Author Topic: UIButton intermittenly not receiving click  (Read 451 times)

CoachCarter9

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 3
    • View Profile
UIButton intermittenly not receiving click
« on: September 15, 2017, 10:38:45 AM »
Hello,

I'm using NGUI 3.9.8 and I have a set of buttons that seem to require multiple presses to fire OnClick. It's very infrequent in Editor but occurs frequently on my iPhone SE. I've included a screenshot of how the buttons is setup. Any help would be great!




ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,151
  • Toronto, Canada
    • View Profile
Re: UIButton intermittenly not receiving click
« Reply #1 on: September 16, 2017, 11:26:07 AM »
Touch events on mobile devices are very imprecise. It's quite possible that the way you press on the screen causes a drag event to fire, which effectively cancels the click event. Check your UICamera -- drag thresholds are specified on it.

CoachCarter9

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: UIButton intermittenly not receiving click
« Reply #2 on: September 20, 2017, 10:05:50 AM »
Hey Aren,

Thanks for the reply! I adjusted the touch drag both higher and lower and with no luck resolving the issue.

Fwiw, it seems to be only a particular button suffering this issue but I personally can't see anything that would be the cause of it.

devomage

  • Sr. Member
  • ****
  • Thank You
  • -Given: 7
  • -Receive: 67
  • Posts: 250
    • View Profile
Re: UIButton intermittenly not receiving click
« Reply #3 on: September 20, 2017, 06:11:56 PM »
is there possibly an extra collider that is blocking the event?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,151
  • Toronto, Canada
    • View Profile
Re: UIButton intermittenly not receiving click
« Reply #4 on: September 24, 2017, 01:35:14 AM »
Or perhaps the button is so small that a touch event moves off of it easily. Mobile device buttons generally need to be rather large.