Search Unity

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