[SerializeField] private string _tagToDetect = "Player";
private void OnTriggerEnter(Collider other)
{
if(other.gameObject.CompareTag(_tagToDetect))
if (other.gameObject.CompareTag(_tagToDetect))
GetComponent<AudioCue>().PlayAudioCue();
}
// Simplified management of priority levels (values are counterintuitive, see enum below)
[SerializeField] private PriorityLevel _priorityLevel = PriorityLevel.Standard;
[HideInInspector] public int Priority
[HideInInspector]
public int Priority
get { return (int)_priorityLevel; }
set { _priorityLevel = (PriorityLevel)value; }
/// </summary>
void OnValidate()
if(Application.isPlaying)
if (Application.isPlaying)
SetGroupVolume("MasterVolume", _masterVolume);
SetGroupVolume("MusicVolume", _musicVolume);