Detect Trail.renderer.autodestruct

Hi guys,

I’m working on a simple top down game.
I use trail.renderer.autodestruct on my bullets. So basically my bullets get destroyed when velocity is 0.
I would like to instantiate a particle system (an explosion) just before the object is destroyed.

I tried using the velocity of my bullet but it doesnt work.

Any idea why ? Or how i could achieve that ?

Thanks a lot for your help/clues !

Any reason you can’t just use OnDestroy?

Nop… Sorry i didn’t know such Void existed.
Sorry for the useless post… :frowning:

Thanks a lot,

Check out the docs for MonoBehaviour, there are tons of messages like that that you might not be aware of.