private void OnCollisionEnter(Collision collision) { if (collision.gameObject.name == "Bagel") //hacky code, detect bagel and enable "bagel halves" { bagelscript.SplitBagel(); } }
void SplitBagel() { bagelscript.SplitBagel(); }