using UnityEngine; namespace MoleMole { public class AmbientSound : MonoBehaviour { public string enterEventName; public string exitEventName; private void Awake() { if (!string.IsNullOrEmpty(enterEventName)) { Singleton.Instance.Post(enterEventName); } } private void OnDestroy() { if (!string.IsNullOrEmpty(exitEventName)) { Singleton.Instance.Post(exitEventName); } } } }