Destroy instantiated particle effects when they have finished playing.
(Unique Video Reference: 35_RR_CU2)
We would love to know…
What you found good about this lecture?
What we could do better?
Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…
This lesson is not playing and jumps to the first lesson of TileMap. I notice the lesson shows 0, perhaps that’s why. I am sure you would have noticed but just in case.
I called the following method in the Start method of my EnemyDamage (and similar in TowerFactory) script:
private void vfxParentCheck()
{
if (vfxParent = GameObject.Find("VFX")) // if an object with name "VFX" is found...
{
return; // carry on.
}
else vfxParent = new GameObject("VFX"); // Otherwise, create an empty gameobject with that name
}
I didn’t go forward with the suggested way of destroying particles, instead I used the solution from a previous discussion forum post (disabling loop and setting destroy for the stop action within the particle settings).
Reason why I went this way? It seemed more intuitive to have the particle system take care of itself.
I have also chosen this approach @Michael_Hiatt for the same reasons.
Less clutter in the hierarchy and like you said, the particles seem to take care of themselves