Nested Sequence not playing
« on: August 12, 2015, 07:21:51 PM »
For starters, thanks for making DOTween, and thanks for offering it free of charge!  I just made a small PayPal donation.  :)

I'm new to DOTween, so this is probably user error, but I'm not able to get a nested Sequence to play.  For my project, I have my DOTween preferences set up as shown in the attachment.  And the following code is running on Start():

Code: [Select]
// define Tweeners and Sequences
topPanelText_In = DOTween.Sequence ();
topPanelText_In.Append (headerText.DOAnchorPos(textRestPos,0.75f).SetEase(Ease.InCubic));
topPanelText_In.Insert (0, headerText_Text.DOFade(color_headerText.a, 0.75f));

topPanelText_Change = DOTween.Sequence ();
topPanelText_Change.Append (headerTextOut.DOAnchorPos(textOutPos,0.5f).SetEase(Ease.OutCubic));
topPanelText_Change.Insert (0, headerText_Text.DOFade(0, 0.5f));
topPanelText_Change.Insert (0.35f, topPanelText_In);

topPanel_In = DOTween.Sequence();
topPanel_In.Append (topPanelGroup.DOFade (1f, topPanelImgFadeDuration));
topPanel_In.Insert (0.5f,topPanelText_In);

Now, only Tweeners are set to autoPlay, so I start up the sequences later, but when I run topPanel_In.Play(), the fade happens, but topPanelText_In never starts.  If, for example, I add an onPlay handler, it never fires.

Am I making a really obvious mistake that I can't see?

Re: Nested Sequence not playing
« Reply #1 on: August 12, 2015, 10:56:57 PM »
I haven't resolved this issue, but I might drop it since the thought finally occurred to me to do the obvious workaround of just inserting the two Tweeners from the sequence that I want:

Code: [Select]
topPanel_In = DOTween.Sequence();
topPanel_In.Append (topPanelGroup.DOFade (1f, topPanelImgFadeDuration));
// topPanel_In.Insert (0.5f,topPanelText_In);
topPanel_In.Insert (0.5f, headerText.DOAnchorPos(textRestPos,0.75f).SetEase(Ease.InCubic));
topPanel_In.Insert (0.5f, headerText_Text.DOFade(color_headerText.a, 0.75f));

I'm gonna go with that unless I get guidance on using the nested Sequence properly.

*

Daniele

  • Dr. Admin, I presume
  • *****
  • 378
    • View Profile
    • Demigiant
Re: Nested Sequence not playing
« Reply #2 on: August 13, 2015, 01:57:10 AM »
Hi,


Thanks a lot for the donation! :)


I can't see any mistake in the code you wrote, so I'll need to make some tests: maybe it's a DOTween bug. Gonna make some quick test now then continue tomorrow morning (superlate here).


Cheers,
Daniele

Re: Nested Sequence not playing
« Reply #3 on: August 13, 2015, 03:55:20 AM »
Thanks for looking into it.  It may have something to do with the fact that I'm tweening UI Text elements.  If you need a broader code snippet or any details about the way things are set up, let me know.

Really though, performance-wise it's not a big deal.  I don't have some particle system with thousands of elements to deal with.

*

Daniele

  • Dr. Admin, I presume
  • *****
  • 378
    • View Profile
    • Demigiant
Re: Nested Sequence not playing
« Reply #4 on: August 13, 2015, 02:25:14 PM »
Hey,


I replicated your code, tweening a UI text plus CanvasGroup too, but everything works correctly here, so there might be something else going on in your project. If possible, can you re-create this issue in a barebone example and send me the UnityPackage, so I can check it out?


Cheers,
Daniele

Re: Nested Sequence not playing
« Reply #5 on: August 13, 2015, 05:19:44 PM »
Ha!  I'm not surprised to hear that it worked for you.  I'm sure there's something wonky that I did that's preventing things from functioning.

I'll send you a pared down version of the project with the error.