- Home /
Question by
LiveRock · Mar 25 at 03:57 AM ·
destroy object
All In 1 Vfx Toolkit
Hi
I bought the All In 1 Vfx Toolkit from Assets Store (https://assetstore.unity.com/packages/vfx/all-in-1-vfx-toolkit-206665)
I am using one of the prefabs (bomb explosion) when a projectile hit the player. I use instantiate like so:
var vriusExplode = Instantiate(vfxHitTargetDeltaDie, transform.position, Quaternion.identity);
Destroy(hitComponentVirus.gameObject, 1);
Destroy(vriusExplode, 1)
However, after I destroy the GameObject, the vfxHitTargetDelta still around playing the last part of the animation.
How to I get rid of it?
Comment
Your answer
Follow this Question
Related Questions
Destroy function not documented? 2 Answers
Destroy On Contact 1 Answer
unet 5.2 client authority destroy 1 Answer