I have a button that starts the game. In the editor it works fine – click it changes color and starts the game (loads new scene).
On mobile it changes color when selected/clicked but stays in the “Active” color, without calling the function it’s supposed to call.
Any ideas why this may be happening?
I’ve also done it with an event for “pointer click”, same deal – works fine in the editor (gets two debug logs for the function, since both on click and event pointer click are working), but not at all via touch.
UPDATE: If i touch the button repeatedly it seems to eventually work. After maybe 5 seconds of tapping.
SIde note: It seems possible to select 2 or 3 buttons at once. (yellow is my “is pressed” color, and all three buttons were able to turn yellow at once if I spammed them with my fingers)
I have just experienced the exact same behaviour mentioned above but in RC2. Booh. Same deal. I can get the button to work by tapping on it with very quick short taps eventually. But it’s mega janky.
Hmmm, on further testing, the button OnClick() is working on the mobile, but animations aren’t playing.
Again, the animations work in the Editor, but not on the mobile.
I don’t know if it is related but I had some issues trying to figure why some of my buttons were not taking a ONClick. After trial and error I found two scroll bar Handles on unrelated UI gameobjects that had NaN as the top and bottom values. If Disabled that scrollBar handle then my buttons are pressable. If I re-enable the handle then they are not.
On one scroll bar I was able to reset the value from Nan to -10 which seems to be the default but on the other handle it will not let me over ride it so there must be something else int the layout that is causing this behavior.
I am not sure if I should open a bug a I might just have something misconfigured but I am not sure what that could be.
Hmmm, I made some big changes to my uGUI and now the animations stopped working agian on the mobile
Sigh… They say RC3 will be the final release. I’m worried!
OK, So I Installed KGFDebug because I noticed slight delay when I press the button on the mobile. I had a feeling there was a Null Reference going on there somewhere and sure as eggs, here’s the screenshot from my mobile.
Again, this works in Editor
OK, I nutted out where the error is…
For some reason the OnClick() section to my script won’t accept objects.
I can pass int and string fine, but any objects (I tried Animator and GameObject) seems to cause the Null Reference error.
I can work around it, but it’s kind of annoying.
I have a similar issue on Android with RC3.
If I hold my finger on the button for half a second it works, but if I tap faster, it behave more like a ‘hover’
Same problem here. The passing of objects gives me null reference exceptions. It worked fine before (b18 I think), but after the update to 4.6.1 my whole menu structure stopped working, because I pass them as objects >.<
I have the same problem with the latest Unity3d 4.6 Version (4.6.1p3). The default OnClick event of a button does not work at all for mobile devices (android and iOS), but it works in the editor. If i tab on a button on a mobile device, is see only the pressed or hover animation, but no click event is raised. I can raise a click event, when I am tapping repeatedly very fast on a button for about 5 seconds or so.
Is a bugfix in the works or should I use the PointerDown and PointerUp events to handle a click?