Godot Version 4.3
Question
I need to make it so that when the game is paused, the music is under the filter effect (which I was able to implement):
if isPaused:
get_tree().paused = true
self.show()
AudioServer.add_bus_effect(Global.music_bus, AudioEffectFilter.new())
But now I need to do the opposite, namely, when the game is unpaused, the filter effect is removed. As I understand it, this can be done using the remove_bus_effect() function, but I did not understand how to work with it because of the effect index
Code:
$Settings.hide()
get_tree().paused = false
self.hide()
AudioServer.remove_bus_effect(Global.music_bus, AudioEffectFilter) <- doesn't work