using UnityEngine;

[RequireComponent(typeof(Collider))]
public class CreakSoundTrigger : MonoBehaviour
{
    [Tooltip("Звук скрипа, который будет проигран")]
    [SerializeField] private AudioClip creakSound;
    public AudioClip CreakSound => creakSound;

    private void OnValidate()
    {
        var col = GetComponent<Collider>();
        if (col != null && !col.isTrigger)
        {
            col.isTrigger = true;
        }
    }
}