I am using Unity to build a game that is going to be used on PC and Android mobile devices. The problem I have is that when I use a UI Button, it works perfectly on mobile, but on PC and in the editor, is not working.

Why could this be happening?


I found out why this is happening. I use player preferences to store some user settings, and after I tested the app a few times on my Android device, I decided to modify the script. The previous settings remain saved after the update, so it worked on mobile devices, but on the PC it was never used so there was no previous settings to work from.

| improve this answer | |
  • \$\begingroup\$ It sounds like you did not actually build it to your phone (or alternatively, test it via Unity Remote) after your changes. It is always good to keep record of the version your actually testing from. \$\endgroup\$ – Gnemlock Feb 2 '17 at 0:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.