Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
AudioEffect
繼承: Resource < RefCounted < Object
被繼承: AudioEffectAmplify, AudioEffectCapture, AudioEffectChorus, AudioEffectCompressor, AudioEffectDelay, AudioEffectDistortion, AudioEffectEQ, AudioEffectFilter, AudioEffectHardLimiter, AudioEffectLimiter, AudioEffectPanner, AudioEffectPhaser, AudioEffectPitchShift, AudioEffectRecord, AudioEffectReverb, AudioEffectSpectrumAnalyzer, AudioEffectStereoEnhance
音訊效果資源的基底類別。
說明
The base Resource for every audio effect. In the editor, an audio effect can be added to the current bus layout through the Audio panel. At run-time, it is also possible to manipulate audio effects through AudioServer.add_bus_effect(), AudioServer.remove_bus_effect(), and AudioServer.get_bus_effect().
When applied on a bus, an audio effect creates a corresponding AudioEffectInstance. The instance is directly responsible for manipulating sound, based on the original audio effect's properties.
教學
方法
_instantiate() virtual required |
方法說明
AudioEffectInstance _instantiate() virtual required 🔗
覆寫此方法,可自訂在編輯器「音訊」面板或 AudioServer.add_bus_effect() 套用效果時所建立的 AudioEffectInstance。
extends AudioEffect
@export var strength = 4.0
func _instantiate():
var effect = CustomAudioEffectInstance.new()
effect.base = self
return effect
注意: 建議在新實例中保留對原 AudioEffect 的參考,以便於執行時偵測屬性變化並相應調整。