No3371 / DevBlog

0 stars 0 forks source link

DOTween Note #5

Open No3371 opened 5 years ago

No3371 commented 5 years ago

Tweens in Sequences are orderded by time

A sequence is a tween. Tween is based on time. When you do:

s.Append(...);
s.AppendCallback(...);
s.Append(...);
s.AppendCallback(...);
s.AppendCallback(...);

All the appended items are added to the same time pos, and, at least in DOTween, these items could be executed in no particular order, which may not be desired behaviour.

To properly order the sequence, add interval inbetween items:

s.Append(...);
s.AddInterval(0.001f);
s.AppendCallback(...);
s.AddInterval(0.001f);
s.Append(...);
s.AddInterval(0.001f);
s.AppendCallback(...);
s.AddInterval(0.001f);
s.AppendCallback(...);