Пример #1
0
    public void updated()
    {
        GameObject music = GameObject.FindGameObjectWithTag("gameMusic");
        bgmVolume  bVol  = (bgmVolume)music.GetComponent(typeof(bgmVolume));

        currVol = volSlider.value;
        bVol.SetVolume(currVol);
    }
Пример #2
0
 void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(this.gameObject);
         return;
     }
     else
     {
         instance = this;
     }
     DontDestroyOnLoad(this.gameObject);
 }