unity中的鼠标事件,可以通过 Input,GetMouse* 来获得, 0,为左键 , 1 为右键, 2为中键
if(Input.GetMouseButtonDown(0))
{
Debug.Log("鼠标左键被按下!");
}
if(Input.GetMouseButtonDown(1))
{
Debug.Log("鼠标y右键被按下!");
}
if(Input.GetMouseButtonDown(2))
{
Debug.Log("鼠标中间");
}