Trying to make generalized solution for AudioStreamPlayer2D to survive when parent is queue_free()
Here is my attempt
extends AudioStreamPlayer2D
class_name AudioStreamPlayer2DQFree
func play(from_position=0.0):
var copy = duplicate()
copy.finished.connect(queue_free)
get_owner().add_child(copy)
copy.play()
Problem is "The method "play" overrides a method from native class "AudioStreamPlayer2D". This won't be called by the engine and may not work as expected."
Any way to make this work, workarounds or best practices?