23 lines
507 B
C#
23 lines
507 B
C#
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(0);
|
|
}
|
|
|
|
}
|