private Sequence BounceIn(TMP_Text text, float distance = 50, int?charsAhead = null) { Sequence textSequence = DOTween.Sequence(); CharTweener tweener = text.GetCharTweener(); int count = charsAhead ?? tweener.CharacterCount; for (int i = 0; i < count; i++) { tweener.SetAlpha(i, 0); tweener.SetLocalEulerAngles(i, Vector3.forward * 45); tweener.SetLocalScale(i, 1); tweener.ResetPosition(i); tweener.UpdateCharProperties(); } for (int i = 0; i < count; i++) { Sequence charSequence = DOTween.Sequence(); charSequence.Insert(0, tweener.DOFade(i, 1, 1)); charSequence.Insert(0, tweener.DOOffsetMoveY(i, distance, 0.25f).SetEase(Ease.OutCubic)); charSequence.Insert(0.25f, tweener.DOOffsetMoveY(i, 0, 0.75f).SetEase(Ease.OutBounce)); charSequence.Insert(0.25f, tweener.DOLocalRotate(i, Vector3.zero, 0.75f).SetEase(Ease.OutBounce)); textSequence.Insert((float)i / count, charSequence); } textSequence.SetTarget(text); return(textSequence); }