Demigiant / dotween

A Unity C# animation engine. HOTween v2
http://dotween.demigiant.com
Other
2.35k stars 350 forks source link

Sequence.AppendCallback combined with AppendInterval is abnormal #469

Open oeager opened 3 years ago

oeager commented 3 years ago

Hi, I've recently using DoTween and I have a curious behaviour with AppendInterval() method. I paste the code I'm using to :

  var sequence = DOTween.Sequence();
   sequence.Join(target1.transform.DOScale(scale, 0.1f));
   sequence.Join(target1.bubbleRender.DOFade(0.6f, 0.1f));
   sequence.AppendCallback(() =>
              {
                  Debug.Log("Callback1Called  =====>");

              });
   sequence.AppendInterval(10f);
   sequence.Join(target2.transform.DOScale(scale, 0.1f));
    sequence.Join(target2.bubbleRender.DOFade(0.6f, 0.1f));
   sequence.AppendCallback(() =>
              {
                  Debug.Log("Callback2Called  =====>");

              });
   sequence.AppendInterval(10f);

The result I expect is that after the two animations of target1 are completed, the execution returns to Callback1, and then executes the animation of Target2 with a delay of 10 seconds. But in fact, I found that the execution of Callback1 is after AppendInterval,Is there anything wrong?