A global Audio Manager can centralize shared music and SFX.
public class AudioManager : MonoBehaviour
{
public static AudioManager Instance;
[SerializeField]
private AudioSource musicSource;
[SerializeField]
private AudioSource sfxSource;
void Awake()
{
if (Instance != null &&
Instance != this)
{
Destroy(gameObject);
return;
}
Instance = this;
DontDestroyOnLoad(
gameObject
);
}
public void PlaySFX(
AudioClip clip)
{
sfxSource.PlayOneShot(
clip
);
}
}