Demigiant / dotween

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

Update document for DOTween.Init() #443

Open h-shokri opened 4 years ago

h-shokri commented 4 years ago

If we don't initial DOTween (DOTween.Init()) manually then the first tween takes 1 frame to play, however, following tweens play instantly (takes 0 frames). I was digging into the issue for more than one hour... I think it's worth mentioning this fact in the documents to prevent confusions.

Demigiant commented 4 years ago

Ahoy,

I will check this out, but this sounds weird. Every tween should actually take one frame to play, because since it's an animation in the frame you create a tween nothing happens (because the elapsed time will be 0) and the next frame is where things get going.

h-shokri commented 4 years ago

Well you're right somehow... Actually, I've decided to create a test case project for you so you can tell me what's going on here... Amazingly I've found out this: If I init DOTween manually every tween will take 1 frame to play which confirms what you said, otherwise (if let DOTween init itself) the first tween will take 1 frame but following tweens take 0 frame. Then I decided to check this on my colleague PC using Unity 2019 (mine is 2018.3), but the result made me even much more confused: If I init DOTween manually then every tween takes 0 frame to play (while on my PC it takes 1 frame as you mentioned). At this point I really don't have any idea :( I've attached the project in my post. Please give it a try. Thanks.

DOTweenTest.zip