void Start() { musicmanager = GameObject.FindObjectOfType <MusicMnanager>();//finding the object of type we created(MusicManager) and it is the only one Debug.Log("found it : " + musicmanager); volumeslider.value = playerprefsmngr.GetMasterVolume(); difficulty.value = playerprefsmngr.GetDifficulty(); }
void Start() { soundlevel = GameObject.FindObjectOfType <MusicMnanager>(); sound = playerprefsmngr.GetMasterVolume(); soundlevel.changevolume(sound); }