- Home /
Unity 4.6.2 and OnClick() double invocation on iPhone6+ IOS
We seem to be getting double clicks in OnClick() on an iPhone 6 + We have just compiled our programs with Unity 4.6.2 and have the latest NGUI and also built a small test program with just a button that increments a number and it is incrementing it by 2 on each click. If I hold my finger down and then drag over to the button and release it, then it works.
This only happens on an iphone6 +, compiled in x32 and x64 mode. (Have not tested it on other 64 bit devices.) It does not happen on 32 bit devices.
Has anyone else seen this and is there a fix to it?
Need to release soon so need this get this fixed.
I have asked this on the NGUI forms that they suggest I ask here:
Re: Unity's 64 bit mobile support is brand new, it's bound to have issues associated with it. 64-bit windows / linux builds still have problems, and their 64 bit support was added years ago. I suggest reporting it as a bug to them, mentioning an inconsistency between 32 and 64 bit modes.
Thanks
Odd that it should work if you click the button down then move your finger, I'm presu$$anonymous$$g off, the button but not if you click it down and then lift your finger off the button.
Not familiar with NGUI but I assume it has pointerDown pointerUP type events, you're 100% sure the function to add 1 isn't being called by both?
Yes if I click down outside the button and then move my finger over to the button and release then it works ok. If I click the button and release then it give me double.
This only happens on a 64 bit device, compiled as a universal (also tried compiled just as 64 bit). the 32 bit device works as expected.
We're encountering the same issue with Unity 4.6.2.
It happens with the $$anonymous$$ono runtime too and it seems like it's not an NGUI issue, since Unity's UI.Button is receiving the event twice either. It seems that the touch event is sent twice, while mouse events are being sent correctly. A work around (breaking pinch functionality) is to disable the touch event source and enable the mouse event source in UICamera. Since UICamera.Awake overrides those settings for mobiles you need to comment the useTouch = true and use$$anonymous$$ouse = false in Awake. Hope that helps until the bug is fixed.
I think I found the cause of the issue: our iPhone6 plus had Display zoom (Settings -> Display & Brightness) set to 'Zoomed'. Switching it to'Standard' solved the double click issues. lidgen, as it's happening on your side on one out of three phones only, would you $$anonymous$$d double checking the Display Zoom settings to confirm that that's the issue? Update: Just tested it with the latest patch release (4.6.2.p2) and the issue seems to be gone -even in zoomed mode