how to know on which a gameobject is RaycastHit located code example
Example: how to know on which a gameobject is RaycastHit located
if (Physics.Raycast(cam.ScreenPointToRay(...), hit){
Destroy(hit.transform.gameObject);
}
if (Physics.Raycast(cam.ScreenPointToRay(...), hit){
Destroy(hit.transform.gameObject);
}