DOTween (HOTween v2), a Unity tween engine

Hello,

after working a lot on it, DOTween, the sequel of HOTween, is now out.
Compared to HOTween, DOTween is much more powerful, efficient, usable and has tons more features.
Here’s the website with documentation and downloads.
And here’s the new official forum.
1723366--108699--splash_dotween.png

UPDATE
DOTween Pro is now also out, with visual scripting editors and other cool stuff.

14 Likes

400% faster than HOTween!!!. Wow… Good job. :slight_smile:

Hey ZJP, it’s been a long time, glad to see you :slight_smile: I am indeed very satisfied and shamelessly eager to replace HOTween in all my games: this is truly the engine I wanted to have since a long while.

Yey, it finally reached public alpha, congratulations, Daniele! Lot of hard work behind.
And I know what I’m saying watching dosens of those emails from Trello =)
Spreading the world! =D

DOTween requires Unity 4.5.2 or later
can support unity4.3.4? why or why not??:smile:

Yey! Billions of thank to you Dmitriy for all the help you gave me, and for not unsubscribing from Trello in spite of the megaspam xD

@woshihuo12 The only reason is that Unity 4.5 introduced the new Time.unscaledDeltaTime, which is pretty useful with timeScale Independent tweens. I could actually support older versions by reverting to the old way (I just stored Time.realtimeSinceStartup and used that to calculate unscaled time), but I thought that almost no one would still use older Unity versions? Let me know: if I re-implement the old way it will be compatible even with Unity 3 :smile:

consoles maybe? at least PSVita and WiiU use 4.3.4

@woshihuo12 The only reason is that Unity 4.5 introduced the new Time.unscaledDeltaTime, which is pretty useful with timeScale Independent tweens. I could actually support older versions by reverting to the old way (I just stored Time.realtimeSinceStartup and used that to calculate unscaled time), but I thought that almost no one would still use older Unity versions? Let me know: if I re-implement the old way it will be compatible even with Unity 3 :smile:[/QUOTE]

:wink: if i can do next game, i will use 4.5 or later, so i just use hotween, it’s enough for me!!!
thank you …

Good point! Ok, later this afternoon I’m gonna update DOTween to support EVERYTHING :smile:

Done already :slight_smile:

Latest update has a much wider compatibility range: Unity 3.5 or later (just because I couldn’t check on Unity 3.0).

static public void PlayOpenWindowAnim(Transform trans, Holoville.HOTween.Core.TweenDelegate.TweenCallback cb = null)
{
//HOTween.To(trans, 0, new TweenParms().Prop(“localScale”, Vector3.zero));
//HOTween.To(trans, 0.25f, new TweenParms().Prop(“localScale”, Vector3.one).Ease(EaseType.EaseOutBack).OnComplete(cb));
trans.DOScale(new Vector3(0, 0, 0), 0);
trans.DOScale(Vector3.one, 0.25f).SetEase(Ease.OutBack);
}

i want a window show a tween. first the window is localScale zero so hide the window ,then use 0.25s set scale to one so show the window…
but i change with dotween like above…
but can’t work very well…
so can help me??
very thanks…

@woshihuo12 Agh, the dreaded 0 duration tweens :smile: Download the new version (0.7.200) I just uploaded and your code will work :slight_smile:
Also, I added new shortcuts for FROM instead than TO tweens, so you could do the same in one line of code (assuming you just want to tween your window from 0 to its actual scale).

trans.DOScaleFrom(Vector3.zero, 0.25f).SetEase(Ease.OutBack);

//HOTween.To(trans, 0, new TweenParms().Prop(“localScale”, Vector3.zero));
//HOTween.To(trans, 0.25f, new TweenParms().Prop(“localScale”, Vector3.one).Ease(EaseType.EaseOutBack).OnComplete(cb));
trans.DOScale(new Vector3(0, 0, 0), 0);
trans.DOScale(Vector3.one, 0.25f).SetEase(Ease.OutBack);

both easeOutBack, but the effect not same??why…

static public void PlayCloseWindowAnim(Transform trans, DG.Tweening.Core.TweenCallback cb)
{
trans.DOScale(Vector3.zero, 0.25f).SetEase(Ease.InBack).onComplete = cb;
//if (!HOTween.IsTweening(trans))
//{
// HOTween.To(trans, 0.25f, new TweenParms().Prop(“localScale”, Vector3.zero).Ease(EaseType.EaseInBack).OnComplete(cb));
//}
}

and i also have a close tween…before i use HOTween.IsTweening(trans)) to judge the trans is tweening,
so the tween will not repeat…
in Dotween, how can i get this???

Hey, great work man. We’re using HOTween extensively in our current project.

Are pluings supported right now? If not, will they be supported in the near future? We’re using the PlugVector3Path to move our main character through a map.

@woshihuo12 DOTween was using a different default overshoot for OutBack tweens. Just updated it so it’s the same and both tween will play identically now.
About IsTweening I’m working on it right now :slight_smile:

@CremaGames plugins are already supported: it’s just that their API is now way more convenient. For example, to move a transform only on the Y axis with HOTween you do this:

HOTween.To(myTransform, 1, new TweenParms()
  .Prop(new PlugVector3Y("position", 45))
);

while with DOTween you do this:

myTransform.DOMoveY(45, 1);

or this, in case you prefer the generic way:

DOTween.ToAxis(()=> myTransform.position, x=> myTransform.position = x, 45, 1).SetOptions(AxisConstraint.Y);

About PlugVector3Path I plan to add it in the next weeks, but it will probably be a “pro” feature (you can read about it here).

Cool, we will wait a bit more in order to replace our HOTween integration then. Pro version sounds fine :slight_smile:

@woshihuo12 Voilà, IsTweening has been added too in v0.7.215. Here’s the docs about it.
P.S. it doesn’t return a bool anymore though, but an int. So you’ll just have to check if the result is > 0

You’re awesome! I’ve been reading the docs and it looks so GOOOOOD. (HOTween was already nearly perfect…)

Though I think IsTweening should be renamed, as its name kinda implies that it returns a boolean value. At least that’s what people are probably used to. Perhaps GetNumberOfTweens or something equally unwieldy? :wink:

And please write some tips on how the caching or reusing or storing or autokilling works. I’d love a concrete example, you know, “If you do this the same tweener is used again! And if you do this a new one is created!” I’ve just started storing and reusing HOTween tweeners and it seems that most of the manual stuff is now done behind the scenes. But how do I best use it? :slight_smile:

@neonblitzer Thank you! Glad you like it :slight_smile:

You’re totally right about IsTweening. I will actually make it return a bool instead than changing the name (but tomorrow, after I finish implementing LoopType.Incremental), which seems to make more sense.
About the cache, I updated the FAQ with a " how cache works" topic. Let me know if it’s comprehensive enough or you think more informations are needed.