how to know on which a gameobject is RaycastHit located
if (Physics.Raycast(cam.ScreenPointToRay(...), hit){
Destroy(hit.transform.gameObject);
}
Are there any code examples left?
New code examples in category C#
if (Physics.Raycast(cam.ScreenPointToRay(...), hit){
Destroy(hit.transform.gameObject);
}