2020-03-05 00:48:39 +01:00

21 lines
356 B
C#

using UnityEngine;
using UnityEngine.Assertions;
using UnityAtoms.BaseAtoms;
public class DestroyMe : MonoBehaviour
{
[SerializeField]
FloatReference _delay;
void Start()
{
Assert.IsNotNull(_delay);
Destroy(gameObject, _delay.Value);
}
public void DestroyImmediate()
{
Destroy(gameObject);
}
}