유니티 숫자 애니메이션 쉽게 구현하기!!
프로그래밍/유니티(unity)2025. 2. 12. 03:51
유니티로 코인 등 숫자를 증가 감소 할때 숫자가 자연스럽게 움직이는 애니메이션을 구현해야 될때가 있습니다
쉽게 구현할려면 DoTween을 사용하면 되는데요
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
먼저 위의 에셋을 내 프로젝트에 추가한 다음
startCoin = 1000;
result += 1000;
DOTween.To(() => startCoin, x =>
{
result = x;
CoinText.GetComponent<TextMeshProUGUI>().text = result.ToString();
}, result, 0.5f).SetEase(Ease.OutQuad);
'프로그래밍 > 유니티(unity)' 카테고리의 다른 글
[유니티(unity)] 유니티와 비쥬얼 스튜디오(visual studio) 연결하기 (0) | 2016.09.27 |
---|