In the older versions I was able to add onChange functions to UICheckbox with code like this:
[...]
public UICheckbox check;
void Start ()
{
check.onStateChange += OnCheckChange;
}
void OnCheckChange (bool isOn)
{
Debug.Log("Checkbox state = "+isOn);
}
[...]
Now in 3.0.2 version with UIToggle I was trying something like this:
[...]
public UIToggle toggle;
void Start ()
{
check.onChange += OnToggleChange;
}
void OnToggleChange (bool isOn)
{
Debug.Log("Toggle state = "+isOn);
}
[...]
But error like this appears:
error CS0019: Operator `+=' cannot be applied to operands of type `System.Collections.Generic.List<EventDelegate>' and `method group'
I know there is a visual way of doing this in inspector but i prefer to code

How to code this in new version of NGUI?