using System.Collections; using System.Collections.Generic; using UnityEngine; public class AutoDestroy : MonoBehaviour { public float DestoryTime; // Use this for initialization void Start () { Destroy(gameObject, DestoryTime); } }