低通截止频率(单位:赫兹)。范围为 10.0 到 22000.0。默认值为 5000.0。
请注意,设置此值将重置为此 AudioLowPassFilter 设置的任何自定义截止曲线。
using UnityEngine;
[RequireComponent(typeof(AudioSource))] [RequireComponent(typeof(AudioLowPassFilter))] public class Example : MonoBehaviour { // Moves the cuttoutFrequency from 10 to 22000 following a Sinus function // Attach this to an audio source with a LowPassFilter to listen to it working.
void Update() { GetComponent<AudioLowPassFilter>().cutoffFrequency = (Mathf.Sin(Time.time) * 11010 + 11000); } }