Dotween: onStart does not wait for delay on sequences

Created on 14 Sep 2018  路  3Comments  路  Source: Demigiant/dotween

Hi,

When I create a sequence and set a delay, the sequence is played perfectly with this delay.

The problem comes when I add an onStart event to the sequence. This event is fired when the sequence starts playing and not after the delay as it should be.

As a workaround, adding this onStart event to the first tween of the sequence solves the problem.

invalid

Most helpful comment

Yes! :) And if instead than a callback that fires only once, you want one that fires every time the Sequence starts from the beginning, you should instead use InsertCallback on the Sequence with a time value of 0.

All 3 comments

Hi,

When used with Sequences, SetDelay is the same as using PrependInterval, and that is why OnStart is called immediately: delays exist only with Tweeners. Sorry for the confusion, will explain it better in the docs.

Cheers,
Daniele

Thanks @Demigiant

Then, the good way to achieve this is to set the onStart to the first Tween, right?

Yes! :) And if instead than a callback that fires only once, you want one that fires every time the Sequence starts from the beginning, you should instead use InsertCallback on the Sequence with a time value of 0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Puutalo picture Puutalo  路  8Comments

jul-ya picture jul-ya  路  12Comments

ShadowTM picture ShadowTM  路  4Comments

kruncher picture kruncher  路  7Comments

leeprobert picture leeprobert  路  5Comments