Easy Way to Play Sound in Unity
When dealing with AudioClip in Unity, one thing you don't want to do is manage the AudioSource every time you play. Therefore, we recommend using the following AudioManager class. Even if you want to perform more complex controls such as stopping the sound once played, changing the volume, etc., you should customize this AudioManager class.using UnityEngine;public class AudioManager : MonoBehaviour