unity create object on click code example
Example 1: gameobject on click unity
private void OnMouseOver() {
Debug.Log("Hovering over GameObject");
}
Example 2: unity onclick object
void Update () {
}
void OnMouseDown(){
// this object was clicked - do something
Destroy (this.gameObject);
}