autodesrtuct property of particle system in 3.5.0f5

I was going through online video tutorial. In this tutorial, @5:40 he sets the autodestruct property of a particle system prefab.

I think the tutor used older version of unity, and I am unable to figure out where to set that property in the 3.5.0f5. Can any one help me in this regard?

3 Answers

3

yes, the tutor used older version of unity.Unfortunately new particle system don’t have auto destruction but if you close looping,your particle becomes disable.

1.unchecked looping from particle system editor
2.create a transform variable in your script as public(example explosionTrans)and set your particle object from editor.
3.now in your update method
explosionTrans.particleSystem.transform.position=this.transform.position;
explosionTrans.particleSystem.Play();

Unity 3.5 uses a new particle system called Shuriken and unfortunately it do not has the auto destruction function, so you have to destruct it your-self. Like:

function Start(){
    Destroy(gameObject, time);
}

Where “time” is the duration.