Switching Sound Resources by Script in Godot3

Switching Sound Resources by Script in Godot3

This article explains how to switch between and play multiple sound resources (music and sound effect files) with a single “AudioStreamPlayer” node. Basically, only one sound resource can be set per “AudioStreamPlayer” node. In other words, you must add “AudioStreamPlayer” nodes in the scene tree for each sound resource. You may feel useless in a situation where there are multiple nodes in the scene tree with the same settings except for the sound resource (as shown in the screenshot below), and you may also feel a little uncomfortable with the lack of visibility in the scene dock. So, if you...

2022-10-19 · 3 min · Gobo