1、GoKit
免费开源
AssetStore:https://www.assetstore.unity3d.com/en/#!/content/3663
下载地址:https://github.com/prime31/GoKit
2、ITween
免费开源
官网:http://itween.pixelplacement.com/index.php
AssetStore:https://www.assetstore.unity3d.com/en/#!/content/84
下载地址:https://github.com/jtothebell/iTween
缺点:
3、LeanTween
免费开源
AssetStore:https://www.assetstore.unity3d.com/en/#!/content/3595
下载地址:https://github.com/dentedpixel/LeanTween
优点:貌似比Hotween和Itween性能好,快!参考:http://dentedpixel.com/developer-diary/leantween-speed-comparison-to-itween/
4、Hotween
免费开源
官网:http://hotween.demigiant.com/
AssetStore:https://www.assetstore.unity3d.com/en/#!/content/3311
下载地址:http://hotween.demigiant.com/
5、DOTween
这是Hotween官网出的,速度超过4倍更快,更高效,大量的新功能
下载地址:http://dotween.demigiant.com/download.php#download
If you want, you can download the test package I used (oops sorry, I'll put it up there when I get into beta, otherwise I should update it every hour - but you can still get the most recent one from DOTween's Google Code area).
All these tests were done from a build, since some of these tween engines (DOTween, HOTween and GoKit) do additional stuff while in the Editor to show editor-only debug informations, and thus testing them outside the editor, where it counts, seemed more fair.
To keep the test accurate download the latest versions of all engines and replace the old ones (the ones used here are from July/August 2014).
You'll find more tests for the tween of generic floats because GoKit and iTween couldn't tween as many as the other engines, but I still wanted to show high-level results.
DOTween | HOTween | LeanTween | GoKit | iTween | |
---|---|---|---|---|---|
Average FPS | 124 FPS | 25 FPS | 102 FPS | freezes | freezes |
Startup time | 76 MS | 332 MS | 34 MS | freezes | freezes |
DOTween | HOTween | LeanTween | GoKit | iTween | |
---|---|---|---|---|---|
Average FPS | 412 FPS | 115 FPS | 389 FPS | 387 FPS | freezes |
Startup time | 14 MS | 74 MS | 7 MS | 47,432 MS | freezes |
DOTween | HOTween | LeanTween | GoKit | iTween | |
---|---|---|---|---|---|
Average FPS | 1091 FPS | 888 FPS | 1050 FPS | 998 FPS | 3 FPS |
Startup time | 2 MS | 11 MS | 1 MS | 6,258 MS | 240 MS |
DOTween | HOTween | LeanTween | GoKit | iTween | |
---|---|---|---|---|---|
Average FPS | 68 FPS | 63 FPS | 68 FPS | 65 FPS | 38 FPS |
Startup time | 5 MS | 30 MS | 3 MS | 130 MS | 229 MS |
实现人物沿四个点移动,实现这同一效果,代码分别为:
总结:
从以上分析,Dotween和Leantween效率比较好,但是从代码角度看,Dotween代码可读性强,体现了面向对象的思想,而Leantween仍然要死记字符串!