Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

detecting a right click unity

function Update()
{
   if(Input.GetMouseButtonDown(0)) Debug.Log("Pressed left click.");
   if(Input.GetMouseButtonDown(1)) Debug.Log("Pressed right click.");
   if(Input.GetMouseButtonDown(2)) Debug.Log("Pressed middle click.");
}
 
PREVIOUS NEXT
Tagged: #detecting #click #unity
ADD COMMENT
Topic
Name
4+5 =