DOTween didn't work after loading another scene
I used DOTween for "Fly High, Surfing Duck!" to rotate the duck in the air like the following tweet:I used the following code to rotate the duck:I've released a game for #icantdraw #gamejam named "Fly High, Surfing Duck." It's simple and casual game but has a ranking system. I hope you'll have fun and be a top ranked-player! https://t.co/pFNlSGlOlC#itchio #gamedev #indiedev #indiegames #Unity pic.twitter.com/PTDsUldfJJ
— wakky_games (@GamesWakky) June 7, 2020
transform.DOLocalRotate(new Vector3(0, 0, 360f), 1f, RotateMode.FastBeyond360) .SetEase(Ease.Linear) .SetLink(gameObject)It didn't work after reloading the scene by the following code:
SceneManager.LoadScene(SceneManager.GetActiveScene().name);
Use DOTween.Clear before reloading another scene
I could fix this problem by putting the following code before loading another scene:DOTween.Clear(true);
No comments:
Post a Comment