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.

Resolved [UI] how to use gamepad buttons to navigate "back" UI ?

Discussion in 'Input System' started by Aokkii, Apr 29, 2021.

  1. Aokkii

    Aokkii

    Joined:
    Nov 3, 2013
    Posts:
    117
    How to use the gamepads buttons to navigate as a "back" button to switch betweens UI panels?


    I already know that the Eventsystem component handles the click/enter and navigation/Dpad binding well, but what about a "back" button?

    see attached example picture for reference of what i am trying to do.

    39213700821_aebede9622_c.jpg UIMENU.jpg



    EDIT: is the event system "cancel" binding the way to go in this case? and then use a script as a handler of the OnCancel event?
     
    Last edited: Apr 29, 2021
  2. Aokkii

    Aokkii

    Joined:
    Nov 3, 2013
    Posts:
    117
    *bump*

    No, The cancel event didn't work either.


    edit: according to the documentation The cancel event only works if the call is made from the selected object.

    So i have two options to do what i want:
    - have a event trigger component with "cancel" on every button.
    - or make a script as a listener of the input system actions(the one showed in the How do I...?). I will go for this route.

    i will mark it as solved.
     
    Last edited: Apr 30, 2021
    Bjornicus likes this.