I have switched my game to use the new Unity Input System, and I want to know which mouse button was pressed when an action is called.
Here’s how it’s set up:
Whenever one of these three mouse buttons are pressed, the MouseButtonClicked action will fire. I want to somehow know which one of these buttons was pressed from this single action, rather than making 3 seperate actions for 3 seperate mouse buttons.
I have tried reading the values from
InputAction.CallbackContext context but I can’t seem to get a proper value from the mouse button which was pressed.
How can I do this?