// -------------------------------------------------------------------------------------------------------------------- // // Copyright (c) VRMADA, All rights reserved. // // -------------------------------------------------------------------------------------------------------------------- using UltimateXR.Core.Components; using UnityEngine; namespace UltimateXR.Animation.GameObjects { /// /// Component that allows to destroy the it is attached to after a variable amount of seconds /// public class UxrDelayedDestroy : UxrComponent { #region Inspector Properties/Serialized Fields [SerializeField] private float _seconds; #endregion #region Unity /// /// Programs the object destruction. /// protected override void Start() { base.Start(); Destroy(gameObject, _seconds); } #endregion } }