[HELP]Data Persistence

I am almost finished my block breaker clone ,While i was testing and making some polishing i found out that i need to do something to keep data between scenes
to be more specified ,I am talking about music settings which I’ve added such as a Toggle to turn it OFF or ON
and a Slider to change the volume value in the scene , And it works perfectly ,but when i change scene i lose it .
For Example :
The volume default value is 1 (Max volume value) ,I changed this value to 0.5 through the slider and load another scene then back again to the scene which include the slider and i found it has the value of 1( the default value)
My attempts:
i tried PlayerPrefs class but it doesn’t work for me
also it doesn’t contain Setbool type to persist the toggle
Could you please give me a strategy or a tips to data persistence

You should be able to store this information in your MusicPlayer. MusicController or MusicManager might be a better name now since you’re storing settings about the music. But since we call DontDestroyOnLoad(gameObject);, it should persist in between scenes.

Privacy & Terms