Sound Effects
Sound Effects allow you to associate audio clips with Events. You can attach one or more audio clips to an Element, and use Events to play the audio when the Event is triggered.
Sound Properties
Property | Type | Description |
---|---|---|
State | string | The name of the Sound. This is used to access the Sound from Events. |
File | string | Path to your audio asset. The audio path can be manually entered, or selected using the File Picker icon. |
Delay | number | Seconds to wait before playing the clip |
Volume | number | Playback volume (0 = mute … 1 = full ) |
Adding a Sound Effects
- Select an Element in the Hierarchy panel
- Scroll down to the Sounds section
- Click the ➕ button to add a Sound.
- Enter a Name that matches the state or event (e.g.
start-press
,menu-open
) - Choose your
.wav
or.mp3
file - Optionally set Delay (seconds) and Volume (0–1)
Example Use: Playing a Sound on Button Press
Use our Button - Pop! template to follow along. This will be our button base, which will play a sound when clicked.
- Select the
unnamed_button_pop
Element from the Hierarchy. - In the Element's Sound section, add a Sound with the following properties:
- Name: click-sound
- File: Any
.wav
file. - Delay: 0
- Volume: 1
- In the Settings Panel, under Events, select the Event named
button-clicked
. - Add a State to the Event.
- Click the State field, and select the
click-sound
Sound state.
Now Toggle Play Mode from the Debug menu or by pressing the F6 key, and perform the action that you added (click, hover, etc). The Event assigned to the Trigger should fire!