I was trying to find a solution that didn't require setting the Sticky Press option to false, mainly due to the issues it causes with scrollviews.
What I came up with was just setting the stickyPress boolean to false when the OnPress function is triggered, then set it back to true when OnPress is false.
PS. At my work, we are using an older version of NGUI, only because we're so dug in with this version and can't afford to change anything at this point. I'm not too sure which version we are on or whether or not this sort of issue has been fixed in newer versions, but this seemed to work for me.
UICamera uiCamera;
void Start ()
{
uiCamera = GameObject.FindObjectOfType<UICamera>();
}
void OnPress (bool isPressed)
{
if (isPressed)
{
uiCamera.stickyPress = false;
// Do whatever you need to do here.
}
else
{
uiCamera.stickyPress = true;
}
}