Skip to content

Instantly share code, notes, and snippets.

@EsProgram
Created January 22, 2015 14:36
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save EsProgram/5d73f7e058bd32237469 to your computer and use it in GitHub Desktop.
Save EsProgram/5d73f7e058bd32237469 to your computer and use it in GitHub Desktop.
Unity
using System.Collections;
using UnityEngine;
/// <summary>
/// パーティクルの自動破棄
/// </summary>
public class ParticleAutoDestroy : MonoBehaviour
{
private void Start()
{
Destroy(gameObject, particleSystem.duration + particleSystem.startLifetime + particleSystem.startDelay + 1f);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment