Demigiant / dotween

A Unity C# animation engine. HOTween v2
http://dotween.demigiant.com
Other
2.36k stars 351 forks source link

Sequence preview overrides values #479

Open AAAYaKo opened 3 years ago

AAAYaKo commented 3 years ago

We are writing our sequencer with editor preview. If we're using in it "From" tweens, after DOTweenEditorPreview.Stop(true); values aren't resets to old positions

brunomikoski commented 3 years ago

I'm also seeing this, on my https://github.com/brunomikoski/Animation-Sequencer :(

Demigiant commented 3 years ago

Uhm, I made some tests and something weird is happening in there indeed, sorry. Hopefully will have a fix within today

brunomikoski commented 3 years ago

Any news about this? 😢

Demigiant commented 3 years ago

I'm so sorry, I forgot to ping you. But it should be solved if you get the last version from the Asset Store or the website, or at least with my tests it all works now both with From and even with Sequences. Can you check if I missed something? In which case I'd need a repo because here it's working now. Sorry again for the delay and the missed ping

brunomikoski commented 3 years ago

Maybe my case is a little bit more tricky because now I'm dealing with multiple sequences as well, here is a simple reproduction project for you to take a look at. Example Project.zip

I just updated it to 1.2.632.

This is the preview part on the AnimationSequencerControllerCustomEditor

        private void Play()
        {
            if (!Application.isPlaying)
                DOTweenEditorPreview.Start();

            if (!Application.isPlaying)
            {
                sequencerController.Play(OnEditorPlaybackFinished);
            }
            else
            {
                sequencerController.Play();
            }
        }

        private void OnEditorPlaybackFinished()
        {
            Stop();
        }

        private void Stop()
        {
            DOTweenEditorPreview.Stop(true);
            Repaint();
        }

Could this be an issue of sequences been auto killed? Either way let me know <3