# Sounds

Playing sounds for Inventool's UI can be handled through [events](https://stylishesper.gitbook.io/inventool/scripting/events "mention"). The example below teaches you how you can play your own audio clips when an Inventool button is clicked.

```csharp
using Esper.Inventool.UI;
using UnityEngine;
using UnityEngine.UIElements;

public class SoundEventExample : MonoBehaviour
{
    [SerializeField]
    private AudioClip myAudioClip;

    private void Start()
    {
        // Register the callback
        // Use onUGUIButtonClicked for uGUI
        Inventool.onButtonClicked.AddListener(OnButtonClicked);
    }

    /// <summary>
    /// Plays a sound.
    /// </summary>
    /// <param name="button">The button that was clicked.</param>
    private void OnButtonClicked(Button button)
    {
        // Play the audio clip
        AudioSource.PlayClipAtPoint(myAudioClip, transform.position);
    }
}
```
