How do you stop a 2D sound?

You first need to keep a reference to the sound that is playing. In other words don’t call “Play 2D Sound” because that doesn’t return a reference. Instead, call Spawn Sound 2D which does return a sound reference.

When you have a sound reference you have two options to turn it off/on.

By call SetActive and passing in a true/false as the “New Active” parameter or by calling ToggleActive which will activate the sound if it’s already activated or deactivate it if it’s not.

30 Likes