Ejemplo n.º 1
0
    public void BlindUI()
    {
        listData.listObj = itemObj;
        listData.UIDic.Clear();
        Button btn = listData.AddUIToDic("test", "Button", "") as Button;

        btn.onClick.RemoveAllListeners();
        btn.onClick.AddListener(() =>
        {
            Debug.Log("点击元素的索引为" + listData.index);
        });
        Text text = listData.AddUIToDic("test1", "Text", "Text") as Text;

        text.text = listData.index.ToString();
    }