| using System.Collections; | 
| using System.Collections.Generic; | 
| using UnityEngine; | 
|   | 
| public class AudioSource3D : MonoBehaviour  | 
| { | 
|     [SerializeField] AudioSource m_AudioSource; | 
|   | 
|     private void Awake()  | 
|     {  | 
|         m_AudioSource.mute = SoundPlayer.Instance.mute;  | 
|         SoundPlayer.Instance.muteEvent += OnAudioSourceMute;  | 
|     } | 
|   | 
|     private void OnDestroy()  | 
|     {  | 
|         SoundPlayer.Instance.muteEvent -= OnAudioSourceMute;  | 
|     } | 
|   | 
|     private void OnAudioSourceMute(bool _mute)  | 
|     {  | 
|         m_AudioSource.mute = _mute;  | 
|     } | 
|   | 
| } |