Choosing Action with Keyboard

How can I select an Action using the numbers 1 through 9 on the keyboard with the new Input System?
How can I know which binding triggered my Action?

It depends on how you set up the bindings and how you reference the actions.

I have replied to a post here that suggested something similar. It checks for a specific mouse button, but you could modify it to check for a specific number key.

You could also look at this, which may help with eliminating a large switch. It uses a for loop instead

imagem_2022-10-28_184835459
Like this, I want 1 action with 9 bindings.

For anyone that is interested, I’ve found this solution on Reddit.

4 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms