dotween icon indicating copy to clipboard operation
dotween copied to clipboard

Allow DOTweenAnimation to specify starting value

Open NibbleByte opened this issue 4 years ago • 8 comments

Hello,

We consider this to be a missing feature. DOTweenAnimation should allow (optionally) to specify what value it should start from instead of the current value left in the editor. Here is a simple use case:

  • I have a white button in a normal state.
  • It has a DOTweenAnimation that when enabled it should flash the button from dark orange to light orange.
  • DOTweenAnimation is used so the artist can set whatever he likes animation without touching the code.

At the moment it seems impossible to set the starting value (no matter TO/FROM) of the tween. It will always flash from white to orange. There are ways to go around this, but it would be simpler if DOTweenAnimation supported this.

We ended up extending it, adding "Start Value" option. It hooks up right before tween creation and sets the specified value, so the DOTween created finds this as initial value. It is kind of a hack indeed. Had to fix the preview as well to restore it on stop. image

DOTween v1.2..632 DOTweenPro v1.0.310

Cheers

NibbleByte avatar Sep 19 '21 09:09 NibbleByte

Ahoy! Adding this to my TODO list :)

Demigiant avatar Sep 21 '21 10:09 Demigiant

Snipaste_2022-08-28_18-03-30

same issue,we even add feature to set value on tween complete, for using dotween for interruptable ui animation

allenz8512 avatar Aug 28 '22 09:08 allenz8512

Has this function been updated? Can I specify Start Value?

seoyeon01 avatar Jun 10 '23 22:06 seoyeon01

I need this feature too, was Googling to find it

Eugen1344 avatar Mar 06 '24 16:03 Eugen1344