Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

onclick firing infinite times

Discussion in 'Editor & General Support' started by duartedd, Nov 13, 2021.

  1. duartedd

    duartedd

    Joined:
    Aug 1, 2017
    Posts:
    148
    Hello can someone help me understand why this is happening:

    When i click a button with onclick (via UI) configured all of the events are firing infinite amount of times till i click again on a different part of the screen or off of the game all together....if i don't it will keep firing the vent over and over again rapidly. Once i click in a seperate area or off of the unity editor / game

    The strange thing is that this just started happening out of the blue. I change a script that has nothing to do with the scene that its occurring on. For the sake of just trying to fix it - i removed the 3 lines of code - but not surprisingly it did the same thing
    I tried to remove the library and rebuilt - still nope

    it seems like its only UI set ONCLICK Event buttons that are having this issue - my scripted onclick listeners do not have this issue at all

    thanks for your time!

    my next attempt i think it to upgrade or something but i am already on 2021.1.25f1
     
  2. duartedd

    duartedd

    Joined:
    Aug 1, 2017
    Posts:
    148
    wonky - something to do with the input manager - updated to the new one - no more issues
     
  3. duartedd

    duartedd

    Joined:
    Aug 1, 2017
    Posts:
    148
    So the onclick seems better but something is still funky with the scroll bar - when i click it its glitchy scrolling up and down sporadically then i click off on another part of the screen and it stops