动态改变UIPopupList选项(NGUI)

NGUI的UIPopupList 可以通过修改items属性来动态改变菜单选项:

 1 public class popListvahnge : MonoBehaviour {
 2 
 3     public UIPopupList popList;
 4 
 5     public void popChange()
 6     {
 7         GetComponent<UILabel>().text = popList.value;
 8 
 9         //popList.items = new System.Collections.Generic.List<string>();
10         popList.items.Add("aa");
11         popList.items.Add("bb");
12         popList.items.Add("cc");
13 
14     }
15 }

如图:

原文地址:https://www.cnblogs.com/wonderKK/p/3902283.html