Answers for "unity get gameobject clicked"

C#
0

unity if gameobject is clicked

void OnMouseDown() 
 {
   Debug.Log("Mouse is down")
 } 

 void OnMouseUp() 
 {
   Debug.Log("Mouse is up")
 } 

 void OnMouseClick() 
 {
   Debug.Log("Mouse is clicked (down then up its 1 click)")
 } 

// Works only if the gameobject have a collider
Posted by: Guest on October-29-2020

Code answers related to "unity get gameobject clicked"

C# Answers by Framework

Browse Popular Code Answers by Language