using UnityEngine; namespace Unity.VRTemplate { /// /// Destroys GameObject after a few seconds. /// public class DestroyObject : MonoBehaviour { [SerializeField] [Tooltip("Time before destroying in seconds.")] float m_Lifetime = 5f; void Start() { Destroy(gameObject, m_Lifetime); } } }