2014年5月12日 星期一

NGUI 建立 按鈕監聽事件

NGUI 建立 按鈕監聽事件
=========================
1 - 在BUTTON上加入Conponent > Internal > EventLinistenr
2 - Script 中加入監聽事件
 public GameObject button1;
  void Awake()
 {
       UIEventListener.Get(button1).onClick = test;
 }

 void test(GameObject button)
 {

 }
=========================