format
typescript
AudioSource.rolloffModeclass: AudioSource
description
The sound attenuation mode of the audio source.
The default value is AudioRolloffMode.Logarithmic. The AudioRolloffMode enumeration defines two sound attenuation modes: Logarithmic and Linear.
parameter
| param_name | type | description |
|---|
reture
| type | description |
|---|---|
AudioRolloffMode | The sound attenuation mode. |
code example
typescript
let obj = new GameObject();
let source = obj.AddComponent<AudioSource>(AudioSource);
source.rolloffMode;