I’ve tried these solutions when trying to play an outro sfx, then an outro loop immediately after. unscaled time is because i reduce the timescale during the outro.
outroStart.Play();
yield return new WaitForSecondsRealtime(outroStart.clip.length)
outroLoop.Play();
outroStart.Play();
yield return WaitForUnscaled(outroStart.clip.length)
outroLoop.Play();
public static IEnumerator WaitForUnscaled(float seconds) {
for (var timer = 0f; timer < seconds; timer += Time.unscaledDeltaTime) {
yield return null;
}
}
In the editor, it works perfectly. When on android, I can notice a slight delay between the two sounds.