Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

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:
    20
    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:
    20