Hi,
I'm new to NGUI (pro), so hopefully this is a simple question to answer.
If I have a bunch of buttons hanging off a UIPanel, there appears to be only two ways of wiring up events to recognise the OnClick() event:
1. Manually wire up the event with a UIEventListener like this: UIEventListener.Get(myButton.gameObject).onClick += _onClick;
2. Create a separate MonoBehavior for each button with the OnClick method handled, explained here:
http://www.tasharen.com/?page_id=160Is there any way of providing a GameObject as a target for all events? So I could just point all buttons at my GameObject and attach something like a UIEventHandler behavior with a OnClick(GameObject go) ?
I'd like to know the best way to do this before getting too deep into our UI.
Cheers,
Shane