Skip to content

格式

typescript
AudioSource.rolloffMode

所属类: AudioSource

描述

音频源的声音衰减模式。

默认值为 AudioRolloffMode.Logarithmic。AudioRolloffMode 枚举定义了两种声音衰减模式:Logarithmic、Linear。

参数

参数名类型描述

返回值

类型描述
AudioRolloffMode声音衰减模式

代码示例

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