Audio Source component
Use Audio Source components to play sounds in your scene.
Read time 1 minuteLast updated 2 days ago
Use the Audio Source component to attach sounds to your GameObjects, and play them when you need. This is useful for adding background music, sound effects, or any other audio elements to your scene. If you move your GameObject, the audio moves with it.
Audio Source properties
The Audio Source component has the following properties you can edit:Property | Description |
|---|---|
| Audio Clip | Select the audio file you want to play. |
| Mute | Enable to silence the audio. Disable to restore the audio at its set volume. |
| Play On Awake | Enable to have the audio play automatically when the scene starts. |
| Volume | Adjust the loudness of the audio. Range is from 0 (no sound) to 1 (full volume). |
| Pitch | Adjust the pitch of the audio. Higher values make the audio sound higher, lower values make it sound lower. |
| Min/Max Distance | Adjust how audio volume changes the further the user gets from the audio source. There are two handles that control the minimum and maximum distance values.
|