Search Unity

Quick way to NOT have selectables "selected" on pointer click?

Discussion in 'Unity UI (uGUI) & TextMesh Pro' started by Democide, Jan 11, 2019.

  1. Democide

    Democide

    Joined:
    Jan 29, 2013
    Posts:
    288
    Using the Unity UI system, if you click on a selectable (like a button etc.) then you trigger it's effect, but also the button becomes selected afterwards. Selected as in highlighted for keyboard/controller-based navigation. This annoys me to no end and I'm currently looking at the UI source to find a way to disable it.

    Since the code is a bit fiddly, with the events etc I thought I'd ask and see if anyone has managed to solve this elegantly.
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    5,201
  3. Democide

    Democide

    Joined:
    Jan 29, 2013
    Posts:
    288
    Thanks, but that's now quite what I was going for. However I had also asked this question on Reddit and someone replied:

    If you set NAVIGATION to none, then the buttons do not take focus.