- Home /
What's the entry name for mouse buttons in InputManager?
I'd like to be able add mouse buttons 0, 1 and 2, or left, middle and right to the input manager. However, whatever wording I seem to try nothing seems to work. A search around wasn't fruitful either. So I figured I'd go for a quick question here: what are the entry names for adding mouse buttons in the input manager? Thanks!
Answer by Eric5h5 · May 13, 2013 at 03:20 PM
They're already set up by default in a new project, under "Fire1", "Fire2", and "Fire3". If you look in those you can see they use "mouse 0" etc. These names are also listed in the docs.
Is there a place that lists off all of the possible mouse buttons? I have a mouse that has left and right buttons next to the scroll wheel and I am unable to find their names in unity.
@lexen1 "$$anonymous$$ouse Buttons: “mouse 0”, “mouse 1”, “mouse 2”, …" have you tried to just enter "mouse X" with ever increasing numbers?
I did, mouse0 is left button, mouse1 is scroll button, BUT mouse2 isn't right mouse button, this is really annoying I tried everything from mouse0 through mouse10, but none seemed to respond to right mouse button
mouse1 is the right button, mouse2 is the middle/scroll button.
You says that it is setup by default, but not see$$anonymous$$gly in 5.6.2, as stated you need to add mouse 0 for left click in the input manager. I am pretty sure they are going out their way to make Unity more annoying now.
No, Fire1 has mouse 0 as the default. At least in 5.6.1; I highly doubt it's different in 5.6.2.
Answer by hawken · Oct 20, 2015 at 11:57 AM
More specifically they are listed here http://docs.unity3d.com/ScriptReference/Input.GetMouseButtonDown.html