for my game I am using DOTween in order to animate an image. I implemented a loop which scales my image higher and then going back to its normale scale. The problem is that I want to end the loop as soon as I press a button or enter another method. Does somebody know how I can do this? Here is the code I am using currently:
image.transform.DOScale(1.6f, 1.5f).SetEase(Ease.InOutSine).SetLoops(-1, LoopType.Yoyo);
Kind regards
You can save the Tweener with an argument, and call Kill() funtion to stop it. Try this:
if you just want to pause it, just call
tweener.Pause();, and replay bytweener.Play();