Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    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. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    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 at 12:17 PM.

  1. jzzja

    jzzja

    Joined:
    Sep 28, 2017
    Posts:
    20
    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:
    20
    I've sorted this now, it was simple, I just added another bool to check the state of the button.