본문 바로가기
개발/Unity

Unity)Unity DoTween 적용 해보기

by 테샤르 2022. 1. 24.

Unity DoTween 적용 해보기

Unity에서 Tween 을 처리하는게 오래전부터 사용하고 있던 DoTween이 있어서 

한번 정리겸 포스팅하게 되었다.

 

Unity Asset Store : [링크]

 

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

Import : [링크]

 

DOTween - Downloads

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 a

dotween.demigiant.com

 

DoTween을 사용하는 방법은 대략 다음과 같다.

이런 형태로 심플하게 사용이 가능하다.

 

간단하게 콜백도 추가도 된다.

   Sequence seq = DOTween.Sequence();
        seq.InsertCallback(1f,() => {
            OnChangeScene();
        })
        
        
transform.DoMove(Vector3 to, float from, snapping);
transform.DoRotate(Vector3 목표값, float durationTime, 회전 Rotate Mode);
transform.DoScale(Vector3 to, float durationTime);


.DoText(string fullText, float time, (...))

간단하게 사용하는 과정에서는 사용하는건 쓸만하다.

 

 

★☆☆☆☆

 

반응형

댓글