Answers for "detecting a right click unity"

C#
1

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.");
}
Posted by: Guest on February-08-2021

C# Answers by Framework

Browse Popular Code Answers by Language