Finally, priority VO
This commit is contained in:
22
Assets/Scripts/Sound/LevelAudioObject.cs
Normal file
22
Assets/Scripts/Sound/LevelAudioObject.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Audio;
|
||||
using System;
|
||||
|
||||
public class LevelAudioObject : MonoBehaviour
|
||||
{
|
||||
public AppleAudioSource narratorAudioSource;
|
||||
public AudioResource firstNarration;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
PlayNarrationAudio();
|
||||
}
|
||||
|
||||
void PlayNarrationAudio()
|
||||
{
|
||||
narratorAudioSource.audioSource.resource = firstNarration;
|
||||
narratorAudioSource.Play();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user