Dotween: Scene reloading stops tweening functionality

Created on 16 Mar 2016  Â·  15Comments  Â·  Source: Demigiant/dotween

This seems a strange one and might be an interaction with Unity and the way it loads/destroys scenes.
Load scene A tweening works.
Load scene B tweening works.
Return to scene A, tweening does not work. Code to do tweening is called but does nothing and no errors are produced.

resolved

Most helpful comment

Hi!

I see that you have your Unity's timeScale set to 0 ;) Unless your tweens are set to be timeScaleIndependent, Unity's timeScale will affect them.

Cheers,
Daniele

All 15 comments

There might be some null reference around which silently kills the tween. Try to disable safe mode from the preferences, and you should get more feedback.

Thanks for coming back to me. I've reworked things to not use two scenes. Will take a look at disabling safe mode as that seems interesting.

Great, and sorry for being so late to get back to you.

Hi, I have exactly the same issue. When reloaded this first scene, after playing the second scene, the tweens won't start anymore. You see in the inspector that the tweens are made, see the screenshot. But the twees are not playing.. If guess it has something to do with references?

I'm using to pro version and we are ready for launch in both app store.. but this issue is holding us back. Hopefully you can respond quick. Thanks.
screenshot 2017-02-26 15 02 41

Hi!

I see that you have your Unity's timeScale set to 0 ;) Unless your tweens are set to be timeScaleIndependent, Unity's timeScale will affect them.

Cheers,
Daniele

:) I'm happy you saw that! So has nothing to do with DOTween! Thanks for the quick answer and keep up the good work! All the best!

I had same thing while tweening on RectTransform. After reloading the SAME scene it would not work.

Workaround that worked for me:

Just call DOTween.clear() like this:

    // TODO Without Clear it won't work.
    DOTween.Clear(true);
    // TODO Reload current scene
    SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);  `

Ajk4 Man you saved me like a ton of work! Thank you! Works like a charm. Was searching for a solution for quite a while.

DOTween.Clear(true);

Solve it for me as well!
Thanks!

DOTween.Clear(true);

It's save my life.Thanks!

Same issue here! This only happens for me when Recycle Tweens in Preferences is set to true; and in this case, Clear(true) does the thing.

I had same thing while tweening on RectTransform. After reloading the SAME scene it would not work.

Workaround that worked for me:

Just call DOTween.clear() like this:

    // TODO Without Clear it won't work.
    DOTween.Clear(true);
    // TODO Reload current scene
    SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);  `

Hi I am new with Unity and I am using playmaker and Dotween could you guide me where to put put the script?

Hi!

I see that you have your Unity's timeScale set to 0 ;) Unless your tweens are set to be timeScaleIndependent, Unity's timeScale will affect them.

Cheers,
Daniele

thanks you very much!

Hi thank you for the response. I checked unity’s time scale and it is currently set at 1.

How do I set timeScaleIndependent? I am using playmaker and I don’t know anything about coding.

Thank you

On Feb 8, 2021, at 7:00 AM, freetricks notifications@github.com wrote:


Hi!

I see that you have your Unity's timeScale set to 0 ;) Unless your tweens are set to be timeScaleIndependent, Unity's timeScale will affect them.

Cheers,
Daniele

thanks you very much!

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

I had same thing while tweening on RectTransform. After reloading the SAME scene it would not work.
Workaround that worked for me:
Just call DOTween.clear() like this:

    // TODO Without Clear it won't work.
    DOTween.Clear(true);
    // TODO Reload current scene
    SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);  `

Hi I am new with Unity and I am using playmaker and Dotween could you guide me where to put put the script?

You can buy this one : https://assetstore.unity.com/packages/tools/visual-scripting/playmaker-actions-for-dotween-by-doozy-49222

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wilczarzgit picture wilczarzgit  Â·  9Comments

Puutalo picture Puutalo  Â·  8Comments

koblongata picture koblongata  Â·  9Comments

jizc picture jizc  Â·  10Comments

Zundrium picture Zundrium  Â·  11Comments