每次延迟的回音衰减。0 到 1。1.0 = 无衰减,0.0 = 全部衰减(即简单的单行延迟)。默认 = 0.5。
using UnityEngine;
[RequireComponent(typeof(AudioSource))] [RequireComponent(typeof(AudioEchoFilter))] public class Example : MonoBehaviour { // Set the decayRatio on the chorus filter to total decay
void Start() { GetComponent<AudioEchoFilter>().decayRatio = 0.0f; } }