Answers for "unity mouse button u"

C#
1

unity left mouse button

// ============== Primary Mouse Button (Left Click) ========================
// It is true aslong the user holds the left mouse button
// Like shooting with an Automatic Gun - AK 47 :P
Input.GetKey(KeyCode.Mouse0)

// It only triggers 1 time when you click
// Like shooting a semi automatic pistol - Desert Eagle ;)
Input.GetButtonDown("Fire1")
Posted by: Guest on November-07-2021
0

unity mouse click

if (Input.GetMouseButtonDown(1)){
	// do what you want
}
Posted by: Guest on February-08-2022

C# Answers by Framework

Browse Popular Code Answers by Language