Question by
DaneBramager · Feb 22 at 04:48 AM ·
audiosource
How do I check if one of these audiosources is playing before playing the other?
if (collision.transform.tag == "Motley") { audioSourceD.Play(); }
if (collision.transform.tag == "Caspro")
{
audioSourceE.Play();
}
I have these 2 different audiosources playing when my player collides with 2 different game objects. So currently it is possible to play one when the other one is already playing and it sounds like cacophony. What I want to happen is before either one plays it checks if the other is already playing and if so it doesnt play.
Comment
Your answer
Follow this Question
Related Questions
audio is not playing during IEnumerator 1 Answer
create audioSource via script? 1 Answer
The microphone.start() function doesn't work in Android platform 0 Answers
BCE0004: Ambiguous reference 'audio': Piano 1.audio, UnityEngine.Component.audio 0 Answers
Comparing sound on external device with the microphone to existing audio file 0 Answers