Demigiant Forum

Unity Assets => DOTween & DOTween Pro => Topic started by: gb288602 on December 09, 2015, 06:05:27 AM

Title: Pro Tween Animation rewind auto?
Post by: gb288602 on December 09, 2015, 06:05:27 AM
I have reusable tweens that play based upon callbacks from other UI elements and it looks they will only play once unless I call rewind before playing them the next time. Is there an option to just have them rewind after each play (they ping pong loop so they end where they start)? If you have something like a button wiggle that should play every time its clicked is there a better workflow than having to always assign an OnComplete rewind action?
Title: Re: Pro Tween Animation rewind auto?
Post by: Daniele on December 09, 2015, 10:28:26 AM
Hi,

All tweens are killed after playing once, unless you deactivate AutoKill (top button in the Inspector).

To just restart an animation, you can use myDOTweenAnimation.DORestart (but remember to deactivate AutoKill).

Cheers,
Daniele