Hello,
I've been using NGUI for about 2 weeks now and I've been quite happy with the results so far!
I'm would like to have a button in my panel call a method on my GameManager object when the button is clicked.
My thought was to make use of UIButtonMessage to send a message to the GameManager. I placed the UIButtonMessage script onto the button and referenced the GameManager as the Target and the method Hello as the function name. I set the trigger to be OnClick.
My GameManager has a script attached to it, which is where I put my Hello method. Not sure how NGUI will reference the script component of the GameManager component to call the method, which could possible be the problem?
I think I must be missing a step or leaving something out, because when I fire things up and click the button, my Hello method is not being called.
void Hello(){
Debug.Log ("Hello Message!!!!");
}
Any advice or guidance you can give as to what I may be missing would be greatly appreciated.
Cheers!