|
|
|
|
|
|
private IEnumerator PlayDelayed() |
|
|
|
{ |
|
|
|
//The wait allows the AudioManager to be ready for play requests
|
|
|
|
yield return new WaitForSeconds(.1f); |
|
|
|
yield return new WaitForSeconds(1f); |
|
|
|
|
|
|
|
//This additional check prevents the AudioCue from playing if the object is disabled or the scene unloaded
|
|
|
|
//This prevents playing a looping AudioCue which then would be never stopped
|
|
|
|