格式
typescript
AudioSource.rolloffMode所属类: AudioSource
描述
音频源的声音衰减模式。
默认值为 AudioRolloffMode.Logarithmic。AudioRolloffMode 枚举定义了两种声音衰减模式:Logarithmic、Linear。
参数
| 参数名 | 类型 | 描述 |
|---|
返回值
| 类型 | 描述 |
|---|---|
AudioRolloffMode | 声音衰减模式 |
代码示例
typescript
let obj = new GameObject();
let source = obj.AddComponent<AudioSource>(AudioSource);
source.rolloffMode;