https://assetstore.unity.com/packages/tools/animation/dotween-hotween-v2-27676
DOTween (HOTween v2) | 애니메이션 도구 | Unity Asset Store
Use the DOTween (HOTween v2) tool from Demigiant on your next project. Find this & more animation tools on the Unity Asset Store.
assetstore.unity.com
프로버전과 무료 버전으로 나눠있음
* 프로 버전의 경우 사용하고자 하는 오브젝트에 component를 추가하여 Inspector window에서 editor를 실행하지 않고 값을 조절하고 플레이해볼 수 있는 등의 장점이 있음
예제와 doc는
http://dotween.demigiant.com/index.php
DOTween (HOTween v2)
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 It is also the evolution of HOTween, my previous Unity tween engine. Compared to it, DOTw
dotween.demigiant.com
에서 확인 가능
위처럼 canvas에서 간단한 UI 애니메이션을 제작하기에 수월
정말 간단하지만 상황에 따라 코드가 분명 어느 정도는 나오기 마련인데
위의 경우
Tweener Tween_Pause;
Tween_Login = rectLoginPanel.DOAnchorPosY(-100f, 1f).SetEase(Ease.InOutExpo).SetUpdate(true);
Tween_Pause.Kill();
Tween_Pause = rectPause.transform.DOScale(new Vector3(0.05f, 0.05f, 0.05f), 0.25f).SetEase(Ease.InOutExpo).OnComplete(() => panel_pause.SetActive(false));
Tween_Pause.Kill();
Tween_Pause = rectPause.transform.DOScale(new Vector3(1f, 1f, 1f), 0.5f).SetEase(Ease.InExpo).SetEase(Ease.OutBounce).SetUpdate(true);
이렇게 간단히 사용 가능
Tween_Pause.Kill();의 경우 esc를 누를 때마다 나오는 Pause window의 애니메이션을 줄 때 앞의 코드의 영향을 받지 않기 위해 사용
여러 Tween Asset들이 있고 사실 iTween을 주로 사용했었지만
iTween보다 사용하기에는 훨씬 직관적이고 편했다.
혹시 iTween을 사용한다면
http://www.pixelplacement.com/itween/index.php
iTween for Unity by Bob Berkebile (pixelplacement)
More "wow" for a lot less "ow". iTween is a simple, powerful and easy to use animation system for Unity. Focusing on the established solutions and frameworks of projects such as TweenLite, Tweener, and other Flash-based tweening and interpolation systems,
www.pixelplacement.com
을 꼭 참고하는 게 좋고
보통 이런 Tween Asset은 엄청난 변화가 아니라 간단한 UI 변화에 많이 사용했는데
iTween의 경우 RectTransform을 변화할 때 좀 불편한 코딩이 필요했는데 어쩜 DOTween은 RectTransform을 DOAnchorPos로 바로 변화를 줄 수도 있음..
easetype은 iTween과 동일하고 SetUpdate를 통해 Timescale에 영향을 받지 않게 할 수도 있다..
개인적으론 iTween보다 사용하기 수월하고 코드도 더 간결하고 직관적이다.
아 Sequence를 사용해서 조금 더 복잡한 애니메이션을 만들 수 도 있다.
'Unity > 꿀 Assets' 카테고리의 다른 글
Unity Keystore Helper - Keystore 비밀번호 매번 치기 귀찮아! (2) | 2022.04.10 |
---|---|
Unity Ragdoll 자연스럽게 죽는..?ㅋㅋㅋ 캐릭터가 죽을 때.. ㅋ..ㅋ.ㅋ (0) | 2021.05.21 |
Unity Dynamic Bone (0) | 2021.05.11 |
모바일 디버그 확인_IngameDebugConsole (0) | 2021.04.21 |