


The function to start the Destructor is Execute().
The script accounts for the fact that VFX is a child game object so it inherits position and rotation during the gameplay. Optionally, the script will detach (unparent) the VFX from the Target Object so that deactivating the object will not affect the VFX being played.
You can set up secondary VFX that can be used, for example, to add an explosion. You can see this in action in the Demo scene.
Cleanup option will remove the VFX and the target game object. If you want to pool these objects or work with them in some other way, you can disable the Cleanup by setting the delay to -1.