Possible pause/resume bug
« on: October 14, 2015, 11:13:55 PM »
I recently added a pause button to my game which means I also want to pause all my tweens when the user clicks the button.

I'm making a call to "DOTween.TogglePauseAll();". That works fine, but I have AutoPlay for sequences disabled, so when the player unpauses the game I then need to call " DOTween.TogglePauseAll()" again - you might already suspect the problem. The second pause toggle is just shorthand for ".PlayAll()", the problem being DOTween has no way of knowing which sequences were halfway through playing when the game paused and which sequences are still in a pause state because they have not been run at least once.

I was able to get around this by ensuring I add "sequence.Complete()" after every sequence I create. I'm guessing this works because behind the scenes there is a flag that is changing from "Paused" to "Completed" after the first play through.

This may or not be by design - the workaround I'm using isn't really that much of a hassle. However if this isn't intended behavior, perhaps starting all tweens in the completed state when AutoPlay is disabled might be handy.

« Last Edit: October 15, 2015, 12:09:42 AM by boolean0101 »

Re: Possible pause/resume bug
« Reply #1 on: November 13, 2015, 05:59:52 PM »
Hi there

Any chance of some feedback on this? I was thinking of doing a blog post on how to work around this, but I want to make sure I'm not missing something obvious first :)