Unity Dotween review: Animation simplified

Animation is one of the main components in game development which requires creativity and patience. Unity Dotween brings both these aspects into your game with ease. It’s a C# animation engine for Unity that can be used to do all sorts of animation using code. Dotween is an upgraded version of Hotween, it’s also known as Hotween v2. The best part about Dotween is, it’s available for free in the Unity asset store, you can download Dotween and import it into your game within minutes.

unity Dotween Features

Dotween is a free and open-source animation engine for Unity. You can do animations with a single line of code. Here is the list of components you can animate with Dotween.

  • Audio animation like mix and fade.
  • Camera animation like rotating, shaking, Field of view etc.
  • Light animation like shadow color intensity.
  • Material animations
  • Rigidbody animations
  • Sprite animations
  • Transform animations

Basically, the list is endless. If there is an element in Unity, you can animate that with Dotween. Some cool animations that you can do with Dotween are as follows

  1. Fading animation in all objects.
  2. Scramble mode in text animation.
  3. Blending color in images.
  4. Animating along a path.

A Simple example

For Dotween, using DG.Tweening needs to be added. As you can see from the example below, we have set the material color to black with Dotween. You can also do that normally without Dotween but, the difference is the fade animation. In this example we have set the Fade time to 2 seconds, so the material will slowly change color.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;

public class colortest : MonoBehaviour
{
    public Material mat;

    public void SetColorToBlack() {
        mat.DOColor(Color.black, 2);
    }
}

Unity Dotween vs Dotween pro

Dotween has two versions in the Unity asset store. One is a free version called Dotween and another is Dotween Pro. Dotween pro is really useful for beginners who are not proficient with coding. With Dotween Pro you can add the animation in the inspector window like any other game object component.

Additional Features in Dotween Pro

1. Ability to add animation in inspector without coding.

2. Support for 3rd party plugins like text mesh pro and 2D toolkit.

3. Visual Path editor, very useful in creating a path animation. You can see more details in the video below.

Conclusion- Unity Dotween

Dotween is a really handy tool for making small animations that make your game game look cooler and more aesthetic. Since Dotween is free there is no point in thinking whether to use it or not. You can decide if you want to get Dotween Pro with Visual scripting depending on your coding skills. In my personal experience I find Dotween pro helps to improve the development time as the component addition in inspector is faster compared to coding. Happy Tweening.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.