Skip to content

format

typescript
AudioSource.rolloffMode

class: 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_nametypedescription

reture

typedescription
AudioRolloffModeThe sound attenuation mode.

code example

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