UNITY TUTORIAL | PROJECT | SPACE SHOOTER |9. Creating Hazards










- Destroy(other) – only removing the collider
- Destroy(other.gameObject) – removing only the gameObject with Collider “other”






- Return ends the execution of a function and hands the control back the function that called it (maybe Unity itself)
- Return ends OntriggerEnter Function and returns the control back to Unity’s Game Loop
- As a result, if the object’s tag is “Boundary”, we will never reach or execute “Destroy” function

