void UpdateOptionsMenu() { Transform l = _optionsPanel.transform.Find("list"); //setup audio for (int i = 0; i < System.Enum.GetNames(typeof(VolumeSource)).Length; i++) { VolumeSource v = (VolumeSource)i; UpdateVolumeItem(l.Find(v.ToString().ToLower()), v); } //setup graphics for (int i = 0; i < System.Enum.GetNames(typeof(GraphicSetting)).Length; i++) { GraphicSetting g = (GraphicSetting)i; UpdateSimpleGraphicItem(l.Find(g.ToString().ToLower()), g); } }
void Set(VolumeSource vs, float volume) { _master.SetFloat(vs.ToString(), (-40f * (1 - volume))); }