Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

[SOLVED]: Unity 4.6 Input and Android Development

Discussion in 'UGUI & TextMesh Pro' started by Superrodan, Oct 5, 2014.

  1. Superrodan

    Superrodan

    Joined:
    Nov 10, 2013
    Posts:
    7
    Hey all,

    I submitted a bug report for this already after testing it in 4.6 20, but was wondering if anyone else could test it for me on different Android devices. You never know when something is a bug for everyone or a bug only on certain phones.

    In the rar I have attached is a scene that is very simple. It has a button with a pointerdown and pointerup event, and two text fields. The pointerdown script increases the top text field. The pointerup script increases the bottom text field. When I run in the editor both actions work as I expect. When I click the button the top number goes up. When I release the bottom one goes up. These numbers should always stay in sync after you release the click.

    When I build this for Android, however, I get different, much more unpredictable results. Sometimes pressing the button involves the number going up twice, sometimes the bottom number doesn't go up. If I hold the button down it seems to constantly trigger the pointerdown event.

    I have an older phone so I was wondering if someone could build the apk themselves and put it on their own device. If it does the same thing for you, then at least I will know it's not just me.

    Thanks!

    EDIT:
    After filing a bug I received this issue number. In the FAQ it requested I add it to the topic:
    Case 637507
     

    Attached Files:

  2. Superrodan

    Superrodan

    Joined:
    Nov 10, 2013
    Posts:
    7
    I have now tried this on a second Android device, an HTC One M7 as well, thanks to a friend. He is seeing the same issue with the scene I created. It seems like ton Android it is registering movement over a button as PointerDown inputs. So if you can stay perfectly still the number stops going up but if you drag, then it constantly triggers PointerDown.
     
  3. Superrodan

    Superrodan

    Joined:
    Nov 10, 2013
    Posts:
    7
    I have finished discussing this with Unity QA and it seems that my issue was checking the box marked "Allow Activation on Mobile" in the Standalone Input Module.

    You should not check this box unless you are using the standalone input module specifically. Once I unchecked that box the test scene worked perfectly on Android.
     
    Tim-C likes this.