Hi there,
I have been trying to use a sequence to execute three actions one after another:
- tween
- block of code
- tween
So I have tried this code:
var seq = DOTween.Sequence();
seq.Append(transform.DOMove(Vector3.one, 0.5f));
seq.AppendCallback(() =>
{
DoSomething();
transform.position = -Vector3.one;
});
seq.Append(transform.DOMove(Vector3.zero, 0.5f));
But it doesn't seem to work. Setting the transform inside the callback has no effect, almost as if the first tween is not yet finished? Now if I change the code this way, it works:
transform.DOMove(Vector3.one, 0.5f).OnComplete(() =>
{
DOSomething();
transform.position = -Vector3.one;
transform.DOMove(Vector3.zero, 0.5f);
});
It may be shorter but it's much harder to read, as the elements in the sequence are not clearly visible.
Somewhere online I found a tip to insert intervals between the steps. Is seems very very ugly. The sequence should take care of the order of execution (that's what sequences are for :)
Is this a bug of DOTween?
Hi there,
I have been trying to use a sequence to execute three actions one after another:
So I have tried this code:
But it doesn't seem to work. Setting the transform inside the callback has no effect, almost as if the first tween is not yet finished? Now if I change the code this way, it works:
It may be shorter but it's much harder to read, as the elements in the sequence are not clearly visible.
Somewhere online I found a tip to insert intervals between the steps. Is seems very very ugly. The sequence should take care of the order of execution (that's what sequences are for :)
Is this a bug of DOTween?