in unity i want to destroy a gameobject when it hits the edge of the screen
// this does take into account EVERY camera, including the editor view one
// but that shouldn't be a big deal once the game is built
void OnBecameInvisible() {
Destroy(gameObject);
}