when objects clicked unity 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); }