Hi im trying to get a particle effect to start after 10 seconds to cover an asset when it gets destroyed
code:
public GameObject objectToDestroy;
public GameObject effect;
void Update ()
{
{
Instantiate (effect, objectToDestroy.transform.position, objectToDestroy.transform.rotation);
Destroy (objectToDestroy, 10f);
Debug.Log ("Plasma Fire destroyed");
}
}
}
I have similar code in other scripts to do the same think but they also include on trigger enter/exit while this is automatic after 10 secs
Any suggestions as to where im going wrong?