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. Dismiss Notice

Other Android, pressing back button repeats the last UI Toolkit button pressed

Discussion in 'UI Toolkit' started by vejab, Dec 30, 2022.

  1. vejab

    vejab

    Joined:
    Dec 21, 2021
    Posts:
    85
    Often, I have this issue : When I press the "back" button on an android phone, instead of doing the same behavior as an escape button press, it also repeat the last function called by a button press.
    So, for example, if I have a button that when clicked does "Debug.Log("test") + hide the button", if I press it, it will write "test" in the console and hide the button. If I then click on the back button on the android phone, it will also write "test" in the console, even if the button is no longer on the screen.
    Does somebody else have this issue?
     
  2. vejab

    vejab

    Joined:
    Dec 21, 2021
    Posts:
    85
    I switched to the latest version of Unity and I can no longer reproduce the issue so problem solved!