Files
AppleHillsProduction/Assets/Scripts/Sound/LevelAudioObject.cs

23 lines
506 B
C#
Raw Normal View History

2025-10-17 14:38:42 +02:00
using UnityEngine;
using UnityEngine.Audio;
using System;
2025-10-29 17:01:02 +01:00
public class LevelAudioObject : MonoBehaviour
2025-10-17 14:38:42 +02:00
{
2025-10-29 17:01:02 +01:00
public AppleAudioSource narratorAudioSource;
2025-10-17 14:38:42 +02:00
public AudioResource firstNarration;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
PlayNarrationAudio();
}
void PlayNarrationAudio()
{
2025-10-29 17:01:02 +01:00
narratorAudioSource.audioSource.resource = firstNarration;
2025-10-17 14:38:42 +02:00
narratorAudioSource.Play();
}
}