Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DoTween repeatType.yoyo not working inside Sequence

I am using DoTween and have a Sequence to scale a button from 0 to 1 and then pulse the scale from 1 to 1.25 looped.

My problem is that the loop inside the Sequence does not work. It will go to scale 1 and then to 1.25 but stop there.

If I just run the loop outside the Sequence it works fine.

DOTween.Sequence()
   .Append(playButton.transform.DOScale(new Vector3(1f, 1f, 1), 1f).SetEase(Ease.OutBack))
   .Append(playButton.transform.DOScale(new Vector3(1.25f, 1.5f, 1), 1f).SetEase(Ease.Linear).SetLoops(-1, LoopType.Yoyo))
   .SetAutoKill(false);
like image 842
Keith Power Avatar asked Oct 20 '25 11:10

Keith Power


1 Answers

Infinite loops will not be applied if the tween is inside a Sequence.

You could set the loop count to a large value. Or use AppendCallback and start the infinite loop from there.

Similar Questions:

  1. https://github.com/Demigiant/dotween/issues/92
  2. https://github.com/Demigiant/dotween/issues/220
like image 109
Iggy Avatar answered Oct 23 '25 00:10

Iggy