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

Resolved Gamepad "submit" not working correctly in UI

Discussion in 'Input System' started by Tempus_G, Mar 15, 2022.

  1. Tempus_G

    Tempus_G

    Joined:
    May 12, 2015
    Posts:
    53
    I am using the new input system to have easy mixed input support.
    I am also using the current UI system , UGUI I think. Not ready to rebuild and /or test the new CSS one yet.

    The issue that I am having, is that all controls that have been set up for the new input system are working with Mouse, Virtual Mouse ( an analogue gamepad joystick mouse ) and keyboard controls. However, the Gamepad controls don't seem to send all the calls.
    Namely this:
    Code (CSharp):
    1.     public void OpenTopMenu()
    2.     {
    3.  
    4.         TopNavUI.SetActive(true);
    5.         EventSystem.current.SetSelectedGameObject(null);
    6.         EventSystem.current.SetSelectedGameObject(firstMenuOption);
    7.     }
    Any selection that calls this works if directly called. But if it is a button that you select with the Gamepad, it never sets the "first selected item".
    Yet the virtual mouse, normal mouse and keyboard select do set the "first selected item".
    I have set up the InputSystemUIInputModule using the template from the ThirdPersonController asset as well as my actionMaps with Actions. So should be correct.

    ================
    Other possible bug that I have is

    On the 2D vector for the "Move" Action, the keyboard down arrow does not move the character down, yet the left arrow will move diagonally down and left.
     
    Last edited: Mar 24, 2022
  2. Tempus_G

    Tempus_G

    Joined:
    May 12, 2015
    Posts:
    53
    I stumbled across another post that lead me to a solution to the first main issue.
    It was to switch UPDATE MODE to: PROCESS EVENTS IN DYNAMIC UPDATE in the project settings under "Input System Package". This seems to have fixed the selecting "first selected" option.

    I still have the other issue though. A BUG ?!?!
     
    Last edited: Mar 24, 2022