DestroyAfter.cs 227 B

1234567891011
  1. using UnityEngine;
  2. using System.Collections;
  3. public class DestroyAfter : MonoBehaviour {
  4. public float destroyAfter = 15.0f;
  5. void Start() {
  6. Destroy(gameObject, destroyAfter);
  7. }
  8. }