private void TeamDropdownSetup() { if (Team.GetTeams() == null || Team.GetTeams().Count <= 1) { Invoke("TeamDropdownSetup", .1f); return; } MouseCoordinates.SetActive(true); TeamDropdown = TeamDropdownObject.GetComponent <ComboBox> (); int TeamNum = Team.GetTeams().Count - 1; string[] TeamNames = new string[TeamNum]; for (int i = 0; i < TeamNum; i++) { TeamNames[i] = Team.GetTeam(i + 1).GetTeamName(); } TeamDropdown.ClearItems(); TeamDropdown.AddItems(TeamNames); SubToggle = SubToggleObject.GetComponent <Toggle> (); //SubDropdownSetup (); TeamDropdown.OnSelectionChanged += (int index) => { TeamID = index + 1; if (SubToggle.isOn) { SubDropdownSetup(); } }; LanguageDropdown.OnSelectionChanged += (int index) => { UpdateLanguage(index); }; }
//public Text t; // Use this for initialization void Start () { //Data = Data.GetComponent<ScoreOfGamer> (); temp = temp.GetComponent<MouseCoordinates> (); //t.text = ""; }