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

Question Can't switch Action Maps

Discussion in 'Input System' started by Robster95, Oct 27, 2022.

  1. Robster95

    Robster95

    Joined:
    Jul 3, 2019
    Posts:
    152
    I am trying to switch from my movement action map to my UI action map.
    The maps only have the escape button in common, which I intend to have different functions depending on the map that is being used.
    When I call for the SwitchCurrentActionMap and input the action map I want it doesn't work.

    I have even tried disabling the current action map and enabling the one I want to switch it with but that doesn't seem to work either. Everything I've seen online seems to say these are the two ways to switch maps.
     
  2. andrew_oc

    andrew_oc

    Unity Technologies

    Joined:
    Apr 16, 2021
    Posts:
    77
    Yep, those are the ways to do it. Can you give us some more details about what doesn't work?
     
  3. X3doll

    X3doll

    Joined:
    Apr 15, 2020
    Posts:
    33
    Make sure you use the same literal string name for the map. Anyway you use the PlayerInput component? Or you generate the class by yourself?

    Explain us your Input Way.