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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[Question] Event Trigger Pointer Enter

Discussion in 'UGUI & TextMesh Pro' started by InvincibleDragon, Dec 18, 2015.

  1. InvincibleDragon

    InvincibleDragon

    Joined:
    Aug 24, 2014
    Posts:
    1
    Hello, I'm developing a game in Unity and a couple of days ago I updated my Unity version from 5.0 to 5.3.0f4. I got two buttons on my 2D game to make the character go forward and go back, respectively. In Unity 5.0, when I built my game for android, the behavior was as expected:

    • Pressing forward the character went forward. If I lifted my finger or didn't touch the button anymore, the character stopped immediately.

    • Pressing the back button the character went back. Same behavior as above.
    This was done with Pointer Enter on Event Trigger with the new UI, but when I updated my Unity version I noticed a slight change on this behavior. Frequently the character in my game keep moving forward/back even if I lifted my finger from the movement button, or didn't touch them anymore. Sometimes he stops, but I can't realise why this is happening.

    There was some change to Pointer Enter? I tested some combinations, even with the PointerClick but the previous behaviour is not happening anymore.

    Some additional clarifications: using Pointer Enter/Exit in Unity 5.0 gave the feeling of moving the character as in a d-pad, i.e., I could slide my fingers between forward/back to my character go in these directions as I wanted. This is not accomplished by using Pointer Up/Down neither on Unity 5.0 nor 5.3.0f4. So, because of this, I can't understand the new behaviour of Pointer Enter.

    Some thoughts on this? Any help is appreciated. Thanks.
     
  2. dreyescairo

    dreyescairo

    Joined:
    Dec 21, 2014
    Posts:
    6
    I'm suddenly having the exact same problem. If anyone has discovered the reason behind the behavior change, please chime in!
     
  3. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    InvincibleDragon: I can only say (based on working with this particular issue for a couple of days now) this seems to be working OK in Unity 5.2.3p3.

    However, I haven't done any real world gaming style testing, only checking that my buttons work how I made them, in editor and device, not particularly many clicks/taps while testing.

    I've mostly used interfaces in simple script, I haven't used EventTrigger component - maybe you can try that and see if it makes any difference.