Skip to content

format

typescript
AudioSource.volume

class: AudioSource

description

The volume of the audio.

Represents the volume of the audio source. The default value is 1.0, which represents full volume.

parameter

param_nametypedescription

reture

typedescription
numberThe volume of the audio.

code example

typescript
let obj = new GameObject();
let source = obj.AddComponent<AudioSource>(AudioSource);
source.volume;