For Godot 4.2
This script and autoload automatically attaches sounds to buttons, tab bars, sliders, and line edits.
Example on itch.io
Example is of Maaack's Game Template, which includes additional features.
For adding SFX to all your project's UI elements from one node.
- Centralizes control of SFX for buttons, tab bars, sliders, and line edits.
- Automatically detects supported UI nodes added to scenes, and attaches sounds.
- Works as a script attached to a node in a scene, or as the project's autoload.
- The
UISoundController
node automatically attaches sounds to buttons, tab bars, sliders, and line edits in the scene.ProjectUISoundController.tscn
is an autload used to apply UI sounds project-wide.
This package is available as a plugin, meaning it can be added to an existing project.
When editing an existing project:
- Go to the
AssetLib
tab. - Search for "Maaack's UI Sound Controller".
- Click on the result to open the plugin details.
- Click to Download.
- Check that contents are getting installed to
addons/
and there are no conflicts. - Click to Install.
- Reload the project (you may see errors before you do this).
- Enable the plugin from the Project Settings > Plugins tab.
- Download the latest release version from GitHub.
- Extract the contents of the archive.
- Move the
addons/maaacks_ui_sound_controller
folder into your project'saddons/
folder. - Open/Reload the project.
- Enable the plugin from the Project Settings > Plugins tab.
Users that want additional features can try Maaack's Game Template.
Attach the UISoundController.gd
script to a node that is in your UI scene, under the root node. Select the node, and assign your audio streams to the various supported UI events.
Alternatively, open ProjectUISoundController.tscn
, select the root node, and assign audio streams to UI events project-wide.