Instantiating the VFX after it's being told to detroy itself? Why does it work?

From what I remember from previous coding work, I fully expected the code to not run after you placed the instantiation code AFTER the destroy code. Why did it work? You are “destroying” the game object before it can create the particle effects, or so the logic would normally (previously?) dictate.

2 Likes

Destroying a game object doesn’t cause that script to suddenly stop running. It will still run its current line of execution until the end, you cannot stop a function mid-way by destroying the game object that it’s attached to

7 Likes

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms