Skip to main content

Sounds Prefabs

Sounds

This array contains audio effects bound to the effect. You can enable several audio tracks at once.

Audio

Simple audio effect on background, looped by default.

Usage

"sounds": [
{
"audio": {
"filename": "sound.ogg",
"loop": true,
"volume": 0.7
}
// ...
}
// ...
]
ParameterDescriptionOptionalDefault Value

filename

Path to audio track. Tracks in .ogg and .wav format are supported.

++

loop

Loop the audio track.

false

volume

This audio track volume. Value from [0, 1].

1

note

To use prefab with sound effect on Web it's mandatory to set player.setVolume(1); in the code.