void Start () { m_Slider = GetComponent<Slider> (); m_Text = transform.GetComponentInChildren<LocalizedLocaleText> (); m_Slider.maxValue = L20n.Locales.Count - 1; for (int i = 0; i < L20n.Locales.Count; ++i) { if (L20n.Locales [i] != L20n.CurrentLocale) { continue; } var value = (float)i; m_Slider.value = value; break; } }
void Start() { m_Slider = GetComponent <Slider> (); m_Text = transform.GetComponentInChildren <LocalizedLocaleText> (); m_Slider.maxValue = L20n.Locales.Count - 1; for (int i = 0; i < L20n.Locales.Count; ++i) { if (L20n.Locales [i] != L20n.CurrentLocale) { continue; } var value = (float)i; m_Slider.value = value; break; } }