Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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!");
}
 
PREVIOUS NEXT
Tagged: #unity #click #object
ADD COMMENT
Topic
Name
5+6 =