showWordsSequence is a global Sequence variable. When I call this method 3 times in a for loop (in the same frame) it works. But, when sequence starts playing and after 1-2 seconds, i call this method again it does not append the animation. Is there any workaround on this?
The text was updated successfully, but these errors were encountered:
About appending sequences: Note that all these methods need to be applied before the Sequence starts (usually the next frame after you create it, unless it's paused), or they won't have any effect.
About virtual methods (I'm impressed that these work): NOTE: virtual methods can't be placed inside Sequences.
Sadly, the only workaround I know is to create whole sequence beforehand. Other idea is to create second, paused, sequence, append to it and have OnComplete callback starting playback of the new one (if it ain't empty).
I might actually rethink about appending to ongoing Sequences, but will take me a while.
Virtual methods do return a Tween object, so in theory they "can" be added to Sequences. But since they're somehow different, I don't recommend doing that. In short, I'm not taking any responsibility for virtual methods inside Sequences :D
Hi. In case anyone else is googling it in 2019. This is the best workaround for this situation.
//'Global' queue for animations. First one ( .Peek() ) is playing, others are waiting in queue
public Queue<Sequence> AnimationQueue = new Queue<Sequence>();
public void PlayQueuedAnimation()
//Create paused sequence
var seq = DG.Tweening.DOTween.Sequence();
//Append everything you want
//Add to queue
//Check if this animation is first in queue
if (AnimationQueue.Count == 1)
private void OnComplete()
//remove animation that was completed
//if there's animations in queue left
if (AnimationQueue.Count > 0)