Hello so i basically have few scenes and buttons like “options” and “main menu” that load scenes. Buttons have audio source in OnClick() but sound cut when next scene is loaded. I want to press button → load scene and meanwhile finishing whole button sound. How can i do that? I thought of adding audio source to other gameobject and add DontDestroyOnLoad to it but then that object is duplicating everytime i return into that scene. Then I tried also to destroy duplicates but it destroys new duplicates, not original one so buttons cant find that audio source anyway.
The sound cuts out because you destroy the object the sound is on and the object the script that plays the sound when you load the new scene, You must either use dontdestroy on load or load your scene additively.