private void Update()
 {
     audioSource.volume = PlayerPrefsWrapper.GetMenuVolume();
     if (SceneManager.GetActiveScene().buildIndex > 1)
     {
         Destroy(this.gameObject);
     }
 }
Beispiel #2
0
    // Start is called before the first frame update
    void Start()
    {
        var name = gameObject.name;

        if (name == "menu")
        {
            GetComponent <Slider>().value = PlayerPrefsWrapper.GetMenuVolume();
        }
        else if (name == "video")
        {
            GetComponent <Slider>().value = PlayerPrefsWrapper.GetVideoVolume();
        }
    }
 void Start()
 {
     audioSource        = GetComponent <AudioSource>();
     audioSource.volume = PlayerPrefsWrapper.GetMenuVolume();
 }