projectEli/Assets/Standard Assets/Asset Store Downloads/Easy FPS/Scripts/DestroyAfterTimeParticle.cs
2022-10-07 22:26:09 -04:00

16 lines
335 B
C#

using System.Collections;
using UnityEngine;
public class DestroyAfterTimeParticle : MonoBehaviour {
[Tooltip("Time to destroy")]
public float timeToDestroy = 0.8f;
/*
* Destroys gameobject after its created on scene.
* This is used for particles and flashes.
*/
void Start () {
Destroy (gameObject, timeToDestroy);
}
}