using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class CountDown : MonoBehaviour { public float time = 1f; private void OnEnable() { Invoke("Down", time); } void Down() { Destroy(gameObject); } }