Search Unity

Bug Button generates 2 click events.

Discussion in 'UGUI & TextMesh Pro' started by georgeq, Apr 15, 2021.

  1. georgeq

    georgeq

    Joined:
    Mar 5, 2014
    Posts:
    662
    My UI contains a button that removes objects from the scene, but every time I click it 2 objects are removed instead of one, I thought it was a bug on my script, but after tracing the code, I discovered that the button is actually generating 2 consecutive events for each click.

    I removed the button component and added a new one, but the problem persists.

    I'm using 2020.2.2f1 with the new input system.