Table of Contents

Class AudioEffect

Namespace
Godot
Assembly
GodotSharp.dll

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 AddBusEffect(int, AudioEffect, int), RemoveBusEffect(int, int), and GetBusEffect(int, int).

When applied on a bus, an audio effect creates a corresponding AudioEffectInstance. The instance is directly responsible for manipulating the sound, based on the original audio effect's properties.

public class AudioEffect : Resource, IDisposable
Inheritance
AudioEffect
Implements
Derived
Inherited Members

Constructors

AudioEffect()

public AudioEffect()

Methods

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool

_Instantiate()

Override this method to customize the AudioEffectInstance created when this effect is applied on a bus in the editor's Audio panel, or through AddBusEffect(int, AudioEffect, int).

extends AudioEffect

@export var strength = 4.0

func _instantiate(): var effect = CustomAudioEffectInstance.new() effect.base = self

  return effect</code></pre>

Note: It is recommended to keep a reference to the original AudioEffect in the new instance. Depending on the implementation this allows the effect instance to listen for changes at run-time and be modified accordingly.

public virtual AudioEffectInstance _Instantiate()

Returns

AudioEffectInstance