Search Unity

Button Navigation set to none reacts on "Return"

Discussion in 'UGUI & TextMesh Pro' started by Toadwolf, Sep 23, 2014.

  1. Toadwolf

    Toadwolf

    Joined:
    Sep 4, 2014
    Posts:
    10
    I am using some buttons for a permanently visible menu with "Navigation" set to "None" since I am using arrow keys and return for controlling the game. However, the buttons still react on that keyboard input. Is this a bug or is there a way to really turn off navigation completely?
     
  2. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    We differentiate between navigation and submit / cancel keys, in b20 we have added an EventSystem property for 'Enable key input' that can globally disable keyboard and controller input. For now look at the Standalone input manger and you will see an entry for 'submit key' and 'cancel key'. Remove these / make them something else and it should work :)
     
  3. Toadwolf

    Toadwolf

    Joined:
    Sep 4, 2014
    Posts:
    10
    Thanks for your answer! I found the input manager under Edit -> Project Settings -> Input. That's not exactly what I was looking for in my case, but now I know it's not a bug, and I will probably tackle the problem from a different direction.
     
  4. xanat0s

    xanat0s

    Joined:
    Nov 20, 2014
    Posts:
    10
    That's because it's not what Tim was indicating.

    When you add a canvas, an EventSystem object should be automatically generated. Select it in your hierarchy to open up its properties in the Inspector. That's where you'll find the relevant components.

    Simply clearing the Submit Button/Cancel Button fields in the Standalone Input Module component will throw a UnityException: Input button is not set up. And setting them to 'something else' seems a bit hacky to me. The solution I came across, which seems to coincide with the documentation, is to set the Send Navigation Events field in the Event System component to false.
     
    Last edited: Nov 29, 2014