我一般不喜欢使用foreach,我喜欢这样
Dictionary<int, string>.Enumerator it = htd.hotInfos.GetEnumerator();
while (it.MoveNext())
{
GameObject go = Instantiate(prefabBtn) as GameObject;
go.name = it.Current.Value;
go.transform.parent = prefabBtn.transform.parent;
go.SetActive(true);
string textStr = "热点" + (it.Current.Key + 1);
go.transform.Find("DropDown_dxl/SelectBox/leftIcon/Text").GetComponent<Text>().text = textStr;
//todo
}