How do I disable some actions in input system but keep a few enabled?

So when I open a map in my game with M I want the input system to be disabled but I want M to be working so I can go back to the game.

200750-screenshot-2022-10-14-194319.png

I have attached Player Input to my player. I think one solution is to use InputAction on the Map and set M there so when I disable the general input system from where I read movement and mouse input, M is still enabled. But is there a way to just disable some of the actions of the Player Input?

In case anyone is looking for a more specific answer to “But is there a way to just disable some of the actions of the Player Input?”, this is what I do to disable a specific action:

PlayerInput pi = GetComponent<PlayerInput>();
pi.actions.FindAction("ActionName").Disable();

You can also disable or switch action maps.

One of the best ways to handle when or when not to allow certain inputs, is to have certain gameStates(enums). This way, only if the certain state is functioning, only certain commands can be given.

as stated in this post: https://answers.unity.com/answers/1923253/view.html

But the best nutshell answer I can give, is code only does what you tell it, so if you didn’t tell it right, it won’t work right.

Also I make my own input manager, so fully relying on unity’s built in one, I am a tad clueless on. I much rather know and control it inside and out. :slight_smile: