void OnCollisionEnter(Collision collision) { if(collision.gameObject.tag == "yourNameOfObject") { //This is example Debug.Log("Hit Object"); //code your thing here } }