Cancel or reset DOTweenAnimation by id
« on: July 02, 2015, 06:32:12 PM »
I'm trying to control several TweenAnimation using the component system, but on starting one tween I want to make the other is cancelled. the behaviour as it stands seems have each tween complete. Does anyone have any more experience of this this?
Is there a way to talk to the Tweens by ids in more detail?

Thanks.

*

Daniele

  • Dr. Admin, I presume
  • *****
  • 378
    • View Profile
    • Demigiant
Re: Cancel or reset DOTweenAnimation by id
« Reply #1 on: July 02, 2015, 07:31:05 PM »
Hi,

Once you set a tween's id (via SetId), every static control operation accepts it as a parameter. For example:
Code: [Select]
// Pause all tweens with the given id
DOTween.Pause(myId);
// Kill all tweens with the given id
DOTween.Kill(myId);
// etc

Re: Cancel or reset DOTweenAnimation by id
« Reply #2 on: July 03, 2015, 01:19:12 PM »
That was simple, doh. Didn't release that I could use the static methods for the tweenAnimation component. Thanks!