unity 3d middle mouse button code example
Example 1: unity left mouse button
//Key Code in the Input Project Settings is "mouse 0"
Input.GetKey(KeyCode.Mouse0))
Example 2: GetMousebuttonDown unity
if (Input.GetMouseButtonDown(1))
//This is too stop spaming the gun