...

유니티로 코인 등 숫자를 증가 감소 할때 숫자가 자연스럽게 움직이는 애니메이션을 구현해야 될때가 있습니다
쉽게 구현할려면 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);