How do I disable player input action map and enable the UI action map?

New input system 1.0.0
I am using the player input component with the behavior set to invoke unity events set.
I have a player input action map and a UI action map. When the player brings up any UI i want to disable the player action map and enable the UI action map. I don’t want the player to be able to move around wall using UI. I did this in the old input system but with the new input system and unity events im lost.
Can i do this if i am using the player input component with unity events? if so are there any good resources and or suggestions?

Allright, since this is still the #1 link in google search for this I’ll add that the most likely way to run into this issue is trying to disable the action map from another script/object not realizing each instance has its own copy of the Input Actions. Hope this helps.

I figured it out. I needed to be using UnityEngine.InputSystem as a using statment. Doing this gave me access to the player input current action map and i could then call .Disable()

If you set a public static Input Action variable in one script and have all others access only that one, then you can enable and disable it without issues.

I am a little new to the input system, so this may not be the best solution, but it has worked for me so far.

I think you can use PlayerInput.SwitchCurrentActionMap or swiching to another action map, here’s the docs.