I am trying to allow the user to choose either a mouse button for their configuration or a key, but I’m not sure how to do that.
Here is the code block that allows the key press and it works fine:
if(_getKey) {
if(Input.anyKeyDown) {
if(Event.current.type == EventType.KeyDown) {
if(Event.current.keyCode != KeyCode.None ) {
KeyCode kc = Event.current.keyCode;
_inputControls.forward = kc;
_getKey = false;
}
}
}
}
But how do I allow them to click a mouse button?