Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved PlayerInput, UI Interaction and Switching ActionMaps

Discussion in 'Input System' started by Chris-Trueman, Aug 26, 2022.

  1. Chris-Trueman

    Chris-Trueman

    Joined:
    Oct 10, 2014
    Posts:
    1,260
    I am trying to be able to disable my gameplay mapping and enable UI mapping so I can interact with the UI without my player moving about.

    The problem with this is the UI doesn't react at all with the UI map enabled.

    I have my action map setup in the UI Input Module. I also set the reference to the input module in the PlayerInput component.

    Switching the action map is simply pInput.SwitchCurrentActionMap("UI"); and turning the cursor back on.

    If I leave the UI Input Module on the default settings for the Input System and do nothing, the UI responds to my mouse.

    I am at a loss to why I cannot get this to work. I have had this problem in the past and recreating the event system usually gets things working, everything I've tried is not working anymore.

    Is there something I'm missing?
     
  2. Chris-Trueman

    Chris-Trueman

    Joined:
    Oct 10, 2014
    Posts:
    1,260
    Turns out my UI map needed the control scheme set on each binding for it to work.

    I have it defaulted to KeyboardMouse in the PlayerInput component, so it wasn't listening for the other bindings not assigned a scheme.