Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Unity UI [SOLVED] Pointer down event on image is being triggered multiple times

Discussion in 'Unity UI & TextMesh Pro' started by jzzja, Nov 10, 2018.

  1. jzzja

    jzzja

    Joined:
    Sep 28, 2017
    Posts:
    24
    I have a seemingly simple problem but I can't find how to fix it. I have a UI image which has a pointer down event on. When clicked it sets a bool to true which then makes my player jump. Even though I click once on the image button the function is triggered multiple times. I also have a pointer up event which sets the bool to false.

    Any advice appreciated, I can post my code if required. Thanks!
     
  2. jzzja

    jzzja

    Joined:
    Sep 28, 2017
    Posts:
    24
    I've sorted this now, it was simple, I just added another bool to check the state of the button.