I made a volume slider for adjusting volume of sfx and background music. The problem is that when i launch the game all volumes are set on max and i have to open the sliders sceen for it to match the volume on slider. It does save the volume when you move between sceens after, but if i stop the game and start it again its still at 100% unitl i open the sceen where i have sliders.
Here is my volume settings code:
If your VolumeSettings object is not created until you open the said sliders screen, that would explain why this code is not executed before!
Also have you looked at ScriptableObjects. This kind of object will preserve the state of its data beyond the life time of your play session, in the sense that changes you make when editing your scene or during PlayMode will never be reset to default values.