850176300 / dotween

Automatically exported from code.google.com/p/dotween
0 stars 0 forks source link

Sequence.Kill(true) does not wait for the end of sequence before killing the tweek #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

- Make a looping sequences with several tweens in it. 
- Start the sequence and call Kill(true) on it a bit later

What is the expected output? What do you see instead?

That the sequence finishes before the tween stops. Instead, it stops 
immediately.

What version of the product are you using? On what operating system?

1.0.220, OSX

Please provide any additional information below.

In my case, I have a sequences of sequences. But I refactored things to use a 
single sequence and the problem still happens. For now, I'm launching a 
parallel co-routine that checks a bool and stops at the end of the coroutine, 
but this is pretty hacky..

I also tried doing this logic on OnComplete, but this is not called in a 
looping sequence. If that's going to remain the case, I suggest having an 
OnLoop() callback as well.

Original issue reported on code.google.com by slipster...@gmail.com on 23 Feb 2015 at 9:26

GoogleCodeExporter commented 8 years ago
Kill(true) doesn't wait for a Sequence to complete, but INSTANTLY completes and 
then kills it (instead than simply interrupting it where it is and killing it).

If you want to kill a Sequence as soon as it's complete you should simply chain 
a SetAutoKill(true) to it, though that's already default behaviour so unless 
you changed that there's no need to specify it.

About OnLoop, there is an OnStepComplete callback, which is called each time a 
single loop cycle ends.

Original comment by daniele....@gmail.com on 24 Feb 2015 at 11:15