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.

Bug Highlighting behavior of buttons stop working until I click somewhere else after initial click.

Discussion in 'UGUI & TextMesh Pro' started by iluvpancakes, Aug 14, 2020.

  1. iluvpancakes

    iluvpancakes

    Joined:
    Jul 19, 2020
    Posts:
    18
    Whenever I create buttons and use the highlighting behavior I get the same issue. It works fine until I click a button. After I clicked a button that particular button will be in its source image state even if I drag the mouse somewhere else and comes back, it wont transition to the highlighting sprite. If I click ANYWHERE else (not on the button though) it starts working again.

    So this is how it works:
    1. I hover a button (it transitions to the highlighted sprite) - success.
    2. I click (without releasing) the button (it transitions to the pressed sprite) - success.
    3. I release the button (it transitions to source image) - Failed (expected: transition to highlighted sprite since I am still hovering)
    4. I remove my mouse from the button area and come back (button stays on source image) - Failed.
    5. At this point I can click it again and it will display normal pressed sprite behavior but it wont under any circumstance transition to highlighted sprite.
    6. I click ANYWHERE OUTSIDE of the button area and then come back to the button (it transitions to highlighted sprite) - Success:ish?
    7. The loop repeats.

    How can I make the button react to hovering actions after being pressed without having to click somewhere else first?

    Thanks a bunch!