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. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    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:
    149
    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:
    149
    wonky - something to do with the input manager - updated to the new one - no more issues
     
  3. duartedd

    duartedd

    Joined:
    Aug 1, 2017
    Posts:
    149
    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