Unity Itween



DOTween is a fast, efficient, fully type-safe object-oriented animation engine for Unity, optimized for C# users, free and open-source, with tons of advanced features

Get the iTween Visual Editor package from David Koontz and speed up your game development process. Find this & other Visual Scripting options on the Unity Asset Store. Sprint into Spring Sale is on: get 50% off top assets and score extra savings with coupon code SPRING2021.

It is also the evolution of HOTween, my previous Unity tween engine. Compared to it, DOTween is more than 400% faster, more efficient, more type-safe, avoids useless GC allocations and offers new shortcuts and features.

  • Use the iTween tool from Pixelplacement on your next project. Find this & more animation tools on the Unity Asset Store. Sprint into Spring Sale is on: Get 50% off top assets and score extra savings with coupon code SPRING2021.
  • ITween.RotateFrom (gameObject, iTween.Hash ('y', 90.0f, 'time', 2.0f, 'easetype', iTween.EaseType.easeInExpo)); Method RotateFrom used to rotate an object. Unlike RotateTo and RotateBy, RotateFrom used to initialize the specified rotation angle and rotate to their original condition. Method, like most others, has an overload.

DOTween is compatible with Unity versions 2020 to 5.6.7.

Works with:
Win, Mac, Linux, Unity WebPlayer, WebGL, iOS, Android,
Windows Phone, UWP (only via IL2CPP starting from v1.2.055), PS Vita (PSM), PlayStation, Xbox, Nintendo Switch + more (didn't test additional platforms but it should work everywhere except with Flash export)

If you didn’t already know Unity 3.5 Developer Preview is now available to the public.
http://unity3d.com/unity/preview/

To me the most exciting thing in the developer preview is the Unity to Flash exporter. The ability to easily create and distribute 3D content on the web without needing the user to have a different plugin.

So the first thing I did was start to port over some older projects. As this is an early build there are a lot of limitations, so moving an existing complex project over isn’t an easy task. One of the major stumbling blocks I had (and from the sounds of things a lot of people are having) is that iTween simply doesn’t work.

iTween is great framework for doing tweening in Unity. So I decided that with my deep knowledge of Unity, iTween and AS3 I would attempt to ‘fix’ the iTween libary to work with the Flash exporter.

Turns out iTween uses a lot of unsupported features and that coupled with the exporter being very new, turned this into a very challenging problem.
45+ hacks and a lot of knowledge later, I won.

Unity Itween Oncomplete

Without further ado here is Flash export ready version of iTween:iTween.cs

Unity Itween Moveto

Here is a quick demo proving it works: SimpleCrateDemo

Itween Path

This version of iTween is a little rough around the edges, but it works in my initial tests.

Known Issues

Itween

-ColorTo & ColorFrom are unsupported as they cause an infinite loop (reason unknown)
-FadeTo & FadeFrom are unsupported as they cause an infinite loop (reason unknown)
-Flash player throws a silent error on Destroy of iTween component (should not effect anything but will show up in Flash debug)

There are probably more issues so let me if you come across any.

Unity Get All Children

I do know that a new version of iTween is being worked on and the Flash exporter is in an early state so this is a temporary version to hold everyone over.

Dotween Itween

PS: This took me an entire day, so if someone uses this to win the Unity ‘Flash in a Flash’ contest you official owe me a drink.