I’ve been looking around trying to find an answer to this, but what I keep finding doesn’t give a definitive answer.
I currently have an Audio Manager game object that transitions between my two scenes (using DontDestroyOnLoad(gameObject);). The sound is adjusted by a slider on my first scene(the title screen) where I set up the reference to the Audio Manager’s script. Now when I run the game, I can adjust the volume using the slider, and the volume which I set is then carried over to the next scene(the actual game).
The problem occurs if I go back to the title screen. The slider’s reference is missing. Here are some images to help clarify:
Value is set and properly adjusts the volume.
After I go from the game to the title screen to readjust the volume.
How do I go about fixing this problem?