Hi,
In my app, I create buttons in code with dynamic configure, the buttons are similar but I need to know which button is clicked in the event, is there a way to bind the event callback like this below?
void OnClickBtn(GameObject go)
{
…
}
Hi,
In my app, I create buttons in code with dynamic configure, the buttons are similar but I need to know which button is clicked in the event, is there a way to bind the event callback like this below?
void OnClickBtn(GameObject go)
{
…
}
Found a way already
go.GetComponent().onClick.AddListener(delegate() {
ClickStage(go);
});