Created
December 3, 2014 00:29
-
-
Save EsProgram/76db1483f07ef44d2440 to your computer and use it in GitHub Desktop.
カメラの描画範囲外でDestroy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using UnityEngine; | |
public class DestroyOnOutOfCamera : MonoBehaviour | |
{ | |
private void OnBecameInvisible() | |
{ | |
Destroy(gameObject); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment