浏览代码

temporary solution for Audio Cue script to start 1 sec delayed

/main
Amel 3 年前
当前提交
f3fbfe61
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      UOP1_Project/Assets/Scripts/Audio/AudioCue.cs

2
UOP1_Project/Assets/Scripts/Audio/AudioCue.cs


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

正在加载...
取消
保存