Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will this code read mouse button X on many button mouses?

I currently don't have a many mouse button mouse at home, but i found nothing about this online.

Will Input.GetMouseButton(x) will read my mouse Xth button for example.

Will this return true if i hold down my mouse 4th mouse button?

bool holding = Input.GetMouseButton(4);

The unity doc only mentions mouse button 1,2 and 3 :/

like image 412
CodeSorcerer Avatar asked May 20 '26 01:05

CodeSorcerer


1 Answers

Actually, yes the function Input.GetMouseButton(4) will read in the 4th mouse button on your mouse when held down :)

(I tested this like half a year ago, Unity doc team should have mentioned this indeed that it can read any mouse buttons, so we dont need to test it :P)

like image 63
Menyus Avatar answered May 23 '26 05:05

Menyus