Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Whatever
how to detect when a gameobject leaves the screen
Esat Genc
Programming language:
Whatever
2021-03-13 20:19:28
0
Q:
how to detect when a gameobject leaves the screen
Jack Ng
Code:
Whatever
2021-08-11 23:07:09
void OnBecameInvisible() { Destroy(gameObject); }
1
Tags
object
screen
how
gameobject
game
when
Related
how to close the keyboard when moving to another screen
how to detect when a player move in unity
Animation effect controls how an element leaves the screen: build out
New to Communities?
Join the community