UI Selectable Sounds - Hertzole/HertzLib GitHub Wiki

UI Selectable Sounds

This component allows you to easily add audio interactions to your UI selectables. All of the sounds are optional so the entire game doesn't crash if you don't want to fill all the audio spots, too!

Fields Explanation

All these are pretty self-explanatory, but I'll go over them anyways!

Play Audio On This:

If true, the audio will be played on the object (it will even add an audio source automatically if one is missing!). Else it will use a global audio source that it also creates automatically.

Enter/Exit Sound:

The sound that will be played when the cursor enters/exits the selectable.

Play Enter/Exit When Disabled:

If true, the enter/exit sound will be played even if the selectable isn't interactable.

Click Sound:

The sound that will be played when the user left clicks on the interactable.

Click Disabled Sound:

The sound that will be played when the user left clicks on the interactable when it isn't interactable.

Volume:

The volume of the sound when it plays.

Pitch:

The pitch of the sound when it plays.

Mixer Group:

The mixer group of the sound, if you use those.

Here's the inspector.
UI Selectable Sounds