为什么我的button点击没反应

GComponent mainUI;
GObject bt;

// Use this for initialization
void Start () {
mainUI = gameObject.GetComponent<UIPanel>().ui;
bt = mainUI.GetChild("n9");
bt.onClick.Add(ChangeScene);

}

// Update is called once per frame
void Update () {

}

void ChangeScene() {
Debug.Log("<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>");
}
已邀请:

洛青逸

赞同来自:

我在编辑器里创建的一个button  用unity运行 点击没反应

洛青逸

赞同来自:

已经解决了!!

要回复问题请先登录注册