Unity-SpaceShooter/Assets/Scripts/DestroyByTime.cs

13 lines
207 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DestroyByTime : MonoBehaviour
{
public float lifetime;
void Start()
{
Destroy(gameObject, lifetime);
}
}