unity c# what did i click code example
Example: detect object click unity
void Update () { } void OnMouseDown(){ // this object was clicked - do something Destroy (this.gameObject); }
void Update () { } void OnMouseDown(){ // this object was clicked - do something Destroy (this.gameObject); }