void Start() { resolutions = Screen.resolutions; resolutionDD.ClearOptions(); List <string> options = new List <string>(); int currentResolutionIndex = 0; for (int i = 0; i < resolutions.Length; i++) { string option = resolutions[i].width + " x " + resolutions[i].height; options.Add(option); if (resolutions[i].width == Screen.currentResolution.width && resolutions[i].height == Screen.currentResolution.width) { currentResolutionIndex = i; } } resolutionDD.AddOptions(options); resolutionDD.value = currentResolutionIndex; resolutionDD.RefreshShownValue(); faders = GameObject.Find("WwiseGlobal").gameObject.GetComponent <faders>(); masterFader.value = PlayerPrefs.GetFloat("MasterFader", 50f); sfxFader.value = PlayerPrefs.GetFloat("SFXFader", 50f); musicFader.value = PlayerPrefs.GetFloat("MusicFader", 50f); }
void Start() { faders = GetComponent <faders>(); }