Audiosource.Play not playing, but causing issues in coroutine

Hey guys,

My name is Benita and I am a code newb.

I have a bursting bubble animation working as I want it to, code looking like this:

public IEnumerator ZapAnimation(){
	animatorOil.SetTrigger ("burst");
	yield return new WaitForSeconds (1);
	Destroy (oilBubObj);

I have an AudioSource named “bubble” declared at the top of the class. When I add bubble.Play() to the coroutine, the AudioSource never plays, the Animator gets stuck in a loop, and the object is never destroyed:

	animatorOil.SetTrigger ("burst");
	bubble.Play ();
	yield return new WaitForSeconds (1);
	Destroy (oilBubObj);

I’m using the same AudioSource for button presses in other scenes, and it works fine.
The clip is about a second long, and is not set to loop/

Appreciate all the help I can get :slight_smile:

Were you able to get your audio to play? I’m having a similar issue myself.