I had imported particle effects “explosion particles” and attached an audioclip to it . It is set to instantiate at run time and produce the explosion effect and a sound as my enemy dies. But when I shoot my enemy it only produces the sound as it dies. And enemy is using the prefab of explosion particles.
What to do?
Hi Mehtab,
What did you expect to happen? How is this supposed to work?
My explosion particles(which had an audiosource) which was applied on an enemy ship. When the ship was destroyed the explosion particles should start playing along with the sound but only sound was playing with no particle effects. The explosion particles were to be instantiated during run time at the postion of the ship. The code was
Instantiate(deathFX, transform.position , Quaternion.identity);
[Serialize Field] GameObject deathFX;
// this is written above the start method.
This script was applied to the enemy ship.
Is “Play On Awake” enabled in the deathFX
particle system?
Thank You mam, I am such an idiot. I literally spent 2 hours trying to figure out what to do. This was such a simple fix.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.