private void addEventListener(GameObject button) { EventDelegate eventDelegate = new EventDelegate(this, "OnChildClick"); eventDelegate.parameters[0] = new EventDelegate.Parameter(); eventDelegate.parameters[0].obj = button; EventDelegate.Add(button.GetComponent<UIButton>().onClick, eventDelegate); }