How do I use multilple sound files on the same object during different actions?

I’ve looked for this question before and all the answers are for pre-Unity 5

I have a shooting game and I want separate sounds for when an object fires and when it dies. Each object has a different set of fire/die sounds.

How do I set it so the right sound plays at the right time in Unity 5?

If you use “AudioSource.PlayOneShot” you could have it play the firing and dying as two different audio clips. You would want to perhaps have “public AudioClip FireClip, DeathClip;” in your character script, and then call “AudioSource.PlayOneShot(theClipYouWantToPlay, 1.0f);” when you need to play one sound or the other.