- Home /
UI Button not working on Android
So I used the new UI features to make a GUI for my app... It works when I'm using Unity Remote 4, and when I run the world PC build, but in the Android apk build thr buttons don't do what they are meant to.
$$anonymous$$aybe add more details to your question so people know more about your problem.
I have buttons which do what theyre meant to in the Editor and in PC build, but they dont work for Android. Im using android sdk build-tools 20... so out of date, but thats because otherwise I get some errors when I build to android.
I'm having the same issue. I Was using Unity 4.6 UI Buttons on Android just fine. After updating to Unity 5 they stopped working.
Answer by Xtro · Jan 08, 2015 at 06:50 PM
Make sure TouchInputModule is attached to the EventSystem object in your game.
I already have a Touch Input $$anonymous$$odule and a Standalone Input $$anonymous$$odule on my event system. On the Touch Input $$anonymous$$odule I have "Allow Activation On Standalone" checked, and on Standalone Input $$anonymous$$odule, I have "Allow Activation On $$anonymous$$obile Devices" checked.
Hi there. Just wanted to thank you as for me, i did not have TouchInput$$anonymous$$odule attached to the EventSystem. For days i was wondering why it wasn't working!!! Again Thanks heaps lol something so simple yet had me lost for days going over my scripts etc!!
Thanks a lot Xtro, I was stuck in this for days I never thought that could be this detail. Thanks.
Thanks, this became an issue (for me) when downgrading from unity 5.3 to 5.2.
Answer by pjezek · Jun 08, 2015 at 07:50 AM
I just had the same issue until I entered "First Selected" with my first button. Since then it worked. Previously I tried to set "Allow Activation On Mobile" for the Standalone Input Module (as I am using Joystick axis for navigation.)
Answer by coolblue2000 · May 16, 2015 at 01:24 AM
I have the same issue. My ui button reacts to a gamepad button0 press through an xbox one pad when run in the editor and also reacts to spacebar press when in the editor. However when I run it on my nexus player the ui button does not react to any button presses from the gamepad. I have set "first selected" to my button control but it just does not work at all....
Answer by MihajloNen · Dec 05, 2015 at 04:35 PM
Hey, I had the same issues. Everything working fine on Editor Mac/Pc/Remote but no reaction, or very unpredictable ones, on the mobile android device. Solution: Update Unity to 5.2.3(Nov.2015) Now the TouchInputs work smooth and reliable BUT I now have some issues with the edge collider, but that's not as far as frustrating as the touchInput-Bug was. @coolblue2000
Answer by zeeshan7036 · Jul 25, 2017 at 01:39 PM
I had the same issue plzz tel the answer
Bro check your Drag Threshold under the EventSystem
EventSystem--EventSystem (Script)--Drag Threshold
Basically, you can set the value around 500 which can make your button work in mobile device, if you want to test out than download Unity Remote 5 and modify Drag Threshold when testing :D