Search Unity

*solved* Particle System explodes on Destroy

Discussion in 'Editor & General Support' started by craig4android, May 10, 2019.

  1. craig4android

    craig4android

    Joined:
    May 8, 2019
    Posts:
    124
    Code (CSharp):
    1. ParticleSystem ps = psc.GetComponent<ParticleSystem>();
    2.         Destroy(psc, ps.main.duration);
    this is how I try to destroy it when it finished, which does work, but when the destruction is actually invoked i got an particle explosion, lasting one Frame, which shouldn't be there. Anyone knows the problem and the solution?

    Edit:
    I found the solution I disabled looping, now it works fine
     
    Last edited: May 10, 2019