Hello all…
I have run into a problem that is driving me insane. I have a camera, a gun object and a muzzle flash particle system (from a prefab) attached to the gun in my FPS game. Attached to the camera is my C# script call PlayerShooting.
The PlayerShooting script is simple for now:
(I am dragging my muzzle flash from the scene onto this in the inspector.)
public ParticleSystem muzzleFlash;
Then of course my firing script is working fine:
muzzleFlash.Play();
When I run this in unity all is well. When I press the fire button the muzzle flash plays perfectly.
THE INSANE PROBLEM:
When I close Unity and reopen my project the PlayerShooting script is still attached and it also appears that the muzzleFlash is still attached but when I run the project the muzzle flash isn’t playing.
If I remove the script from the camera and then reattach the script and drag the muzzle flash back onto it works again until the project is closed and reopened!
What the heck is going on? Please Help!