One particle pulse when gameobject is destroyed.

Hello

I have been messing around with this for some hours now, and i just cant seem to figure it out.

what i want to do is to have a single pulse of a particle system when i destroy a box.

I saw a video tutorial once which explained it but i cant find it anymore, and now im here :)

I've set up the particle system so its set to 'one shot' but how do i script it so the pulse is fired when i click the object and it is destroyed.

im using C# for this.

Thanks in advance

  • Seth

Put the particle system in a prefab and use Instantiate to make a copy when you destroy the object you click.

check out ParticleEmitter.Emit()

we are lucky to have good documentation with unity http://unity3d.com/support/documentation/ScriptReference/ParticleEmitter.Emit.html