format
typescript
AudioSource.volumeclass: 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_name | type | description |
|---|
reture
| type | description |
|---|---|
number | The volume of the audio. |
code example
typescript
let obj = new GameObject();
let source = obj.AddComponent<AudioSource>(AudioSource);
source.volume;