랭귀지/Unity

[unity] 화면 밖으로 나가면 제거하기

유키공 2018. 3. 23. 01:30

[unity] 화면 밖으로 나가면 제거하기

void OnBecameInvisible()
{
  Destroy(gameObject);
}