Search Unity

Question How to stop Button from deselecting when mouse leaves?

Discussion in 'UGUI & TextMesh Pro' started by swazdev_, Feb 10, 2024.

  1. swazdev_


    Sep 6, 2020
    This is such a random specific thing but I've seen other Unity games do it and I just want it for some reason.


    In my game, I have 3 buttons in the main menu.

    When the mouse enters one button the button is put into its "highlight" state.
    When the mouse leaves it goes back to the "Normal" state.

    How can I make it so that when the mouse leaves it stays on the highlight state, so that way even if the mouse is in a completely different area, at least one button stays selected.