Hi!
I want to play a death sound when the player dies. For some reason this sound effect does not play due to the audio source being disabled. Every other sound effect works fine. Im lost, any tips?
Debug it. Experiment.
There are a couple odd things you have going here, so check which one it might be by temporarily removing each one.
- you use
Destroy(gameObject, DeathClip.length)
Does the behavior change if you don’t destroy the object, or you wait a little longer (DeathClip.length+0.1f)?
- right after starting a timer to destroy things, you set the
Time.timeScale = 0
Does the behavior change if you don’t freeze game time?
- you use Destroy() followed by Invoke() with the same timer value

