- Home /
Keep particles around after destroying object
I have a missile with a smoke trail, but when I destroy the missile on collision the particles that were left over suddenly dissapear.
I tried this solution: http://answers.unity3d.com/questions/167827/particles-disappear-when-game-object-is-destroyed.html
But I cant see to get that to work. It says to set the particle effect in the inspector... but if its part of a child object, I cant have 2 object selected in the inspector, can I?
I tried using a GameObject variable, and accessing the particle system / emitter from there, but when I do it says there is no Particle System attached to that object... but there is
Any help would be appreciated
Answer by Owen-Reynolds · Feb 06, 2013 at 05:02 AM
"It says to set the particle effect in the inspector...". This is standard Unity stuff. You select the object, look for the Inspector slot, and drag the emitter into it (don't click-release on the emitter, just click-drag it over.)
If the rocket is a prefab, should be able to do this, then drag whole thing into the prefab. Or, forget that and just say: emitChild = transform.Find("smoke");
(or whatever the emitter child is named.)
Ah, I didn't know about Transform.Find
I ended up just just DeatchChildren() since the smoke object was the only child object, and then destroying it.
Thanks for the info!
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
candle flame without particle emitter 1 Answer
Question about a good textures / terrain shader 1 Answer
Particle Effect on Touch 1 Answer
Designing Particle Textures for Unity 5 Answers