Answers for "unity click on object 2d code"

C#
3

unity click on 2d object

// Requires for the object to have a collider and this script attached
private void OnMouseDown()
{
	Debug.Log("Clicked on object!");
}
Posted by: Guest on October-08-2021

C# Answers by Framework

Browse Popular Code Answers by Language