- Home /
SFX fade out and then fade back in?
Hello again to the Unity community. So I have been implementing SFX for a weapon for one of our characters. The audio source is attached directly to the prefab bullet and plays on awake. It fires based upon an event that is triggered on a frame in the attack animation.
What is happening that after a minute or two of the SFX playing at full volume, it suddenly fades out and then there is no SFX playing at all. then after another minute without sound, it flares back up again and repeats this pattern. It is very odd and not at all what we want. What is supposed to be happening is that the SFX just plays once when the bullet is instantiated. So each bullet that is fired (it fires once per second) plays that SFX when it is instantiated.
As far as I know, there is no script that references that audio source, we do have a few other SFX playing at the same time (but this sound bug doesn't happen with our other characters who use a similar type of set up, their SFX are fine when they fire their weapons), I have tried rebuilding the prefab, double checked the audio file which appears to be fine, it happens on every level in our game, regardless if there are multiple players or not, and there is only one audio listener in the scenes. So I am quite stumped on what could be causing this bizarre bug. If anyone can provide any suggestions or point me in the correct direction, it would be appreciated. Thank you.