In my tests, I'm seeing my onFinished callback being called immediately (well 9 milliseconds later actually) after starting a tween.
It's very obvious in my tests since I have the following code...
public void ButtonClicked(GameObject buttonObject)
{
NGUITools.SetActive(background, true, false);
Debug.Log("Before: " + System.DateTime.Now.Ticks);
backgroundTweener.PlayReverse(); // backwards for some reason
}
Then a different button click calls...
backgroundTweener.PlayForward();
And once the tween is over, I want to disable the GameObject, so I registered the following function with the onFinished event of the Tweener...
public void FadeCallback()
{
Debug.Log("After: " + System.DateTime.Now.Ticks);
NGUITools.SetActive(background, false, false);
}
However, only 90,000 ticks (9 ms) are passing even though the tween is 250 milliseconds (0.25 seconds). Everything works just fine with the SetActive calls removed, except that the GameObject is always active, of course. Everything seems to be hooked up correctly. You can clearly tell that the only issue is that the onFinished is firing immediately.
Before: 635357658363436227
After: 635357658363526232