Hello everyone, I had a problem with the sound settings. Added Slider to the settings that adjusts the volume of the sound (at least should adjust), but only adjusts the sound in the main menu and when you go to the game scene, the settings do not work. How can this be fixed?
using System.Collections; using System.Collections.Generic; using UnityEngine; public class scrAudio : MonoBehaviour { private AudioSource audioScr; private float musicVol = 1f; void Start() { audioScr = GetComponent<AudioSource>(); } void Update() { audioScr.volume = musicVol; } public void setVol(float Volue) { musicVol = Volue; } }