Help me understand Tween

As I’m sure you know, there are a lot of these “Tween” solutions for unity. I know how to use them, that’s easy, but I’m a little bit unclear as to what they even are.

  1. What’s the difference between a Tween engine and an animation system (like unity’s own)? Are these completely unrelated systems, or is one superior to another (ideally)?

  2. Where did this word “Tween” or “Tween Engine” come from? It’s no where to be found on the wikipedia, did some unity guy just make up this word and concept? The only thing I found on wikipedia about it was something to do with female adolescence…

“Tween” comes from “in between”. To my understanding, its roots are from animation. The lead animators would create the key frames of an animation that defined the most important parts of the motion, and other, cheaper animators would come and fill in the frames “in between” by more or less interpolating between two key frames.

As such, tweening is specifically the part of animation where you’re filling in motion between two points. And that’s exactly what “tweening” libraries do - they aren’t full animation libraries, they’re very specifically focused on how items get from one key state to another.

You could indeed use a tweening library a lot and get good animations, or use an animation library just to do tweens. The main value of having different tools or libraries for both is that the use cases or tasks are often pretty different, so it’s nice to have different workflows. For instance, I don’t want to have to bust out the animation window and tweak a bunch of curves if I wish to make my main menu slide in/out animation a little different when that’s something a tweening library can do with a single drop-down box. By the same token, I don’t want to have to manage hundreds of tweens to do a complex cutscene animation when there’s animation tools with workflows built for that.

1 Like

With the animation system in Unity now it easy to just animate the transforms position.

Ah, beTween I see, thx for the info! Yeah would seem like a nightmare moving all of a characters joints via tweens.

I’m also a little bit confused about their implementation. Often these tween engines use .net reflection to operate, so that you can tween any and every property in existence. It seems almost too good to be true, right? What about mobile, I thought mobile didn’t support reflection due to AOT? Is reflection mandatory in every tween engine (or animation engine for that matter), if not how else could you tween any property?

Yep, unity’s animation only works on serialized properties (inspector stuff), whereas most tween systems aren’t limited to that.