Single Audio Player

I have a question more about a single audio player instead of the singleton pattern.

Why is it beneficial to have a single Audio Player?

Should it be fed all music and sound effects to blend in?

Why would it be beneficial to set DontDestroyOnLoad on this single Audio Player instead of letting it be rebuilt on load?

The single audio player is not so much a thing. You can have one or you can have several, it doesn’t matter. All depends on how you want to manage it.

However, in some cases you want music, for example, to start playing on the menu scene and not be interrupted when you go to different scenes. This is when you put the audio player in the DDoL. Then it will continue to play without interruption when you switch scenes, etc.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms