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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Selecting buttons with the mouse

Discussion in 'Input System' started by s_marcell, Feb 6, 2023.

  1. s_marcell

    s_marcell

    Joined:
    Mar 22, 2018
    Posts:
    16
    Hi everyone,

    I've run into the following issue when trying to make UI work with the new input system:

    I'm using the Input System UI Input Module script next my Event System, and I'm feeding my custom input actions asset into it.
    When a UI menu is initialized I'm using the event system's SetSelectedGameObject() method to select a default button on the UI so that gamepad users can navigate through the menu. When changing the control scheme to mouse and keyboard (done automatically by the Player Input class) however, hovering over a different button with the mouse, the auto-selected button stays in the higlighted state.

    Using the gamedpad works as intended, highlighting one button at a time.

    Please let me know how this is supposed to be resolved.

    Thanks,

    Marcell
     
  2. s_marcell

    s_marcell

    Joined:
    Mar 22, 2018
    Posts:
    16