// Use this for initialization void Start() { OptionsToAI = new Dictionary <int, string>(); ListAI.initAI(); var dropdown = this.GetComponentInParent <Dropdown>(); dropdown.options.Clear(); int index = 0; foreach (string s in ListAI.AIPrograms.Keys) { dropdown.options.Add(new Dropdown.OptionData(s)); OptionsToAI.Add(index++, s); } dropdown.onValueChanged.AddListener(delegate { onDropdownChanged(dropdown); }); BoardManager.AIBlue = OptionsToAI[0]; BoardManager.AIRed = OptionsToAI[0]; }
/* * Constructor. Always called before Start functions. Used to initialize. */ void Awake() { ListAI.initAI(); }