I have a NGUI button and it contains UIButton and UIToggle script. From another script i want to run its click event with all relevant button state changes like colour change etc. For this I found this link and here is my code.
public UIButton userManagmentBtn;
public void ClosePanel()
{
Debug.Log("Calling panel Colse");
EventDelegate.Execute(userManagmentBtn.onClick);
}
But the click event is not firing using this: EventDelegate.Execute
No NGUI expert but afaik to invoke all listeners you can simply call
Additionally for having the correct coloring etc you could call
SetStateAlternatively you could try and send "manually" the according pointer events via
ExecuteEvents.Executelike e.g.