- Home /
DOTween, tk2dTextMesh and float
i have a float variable called money that is shown to the user to a 2D Toolkit Text Mesh called txtMoney. When I change the money value, currently I do txtMoney.text = money.ToString(); and that's it. But I want to tween it. I want that the money value is increasing/decreasing by 1 until it reaches the new value. So I decided using DOTween (also useful for other tweens in the game, not just for this).
DOTween Pro supporst 2D Toolkit and Text Meshes, but when I tween the text mesh in this way: txtMoney.DOText(money.ToString(), 2f); as is treated as a string (not a float) it doesn't behave as described before. Also, I can't tween just the variable, because I would need to update the text mesh every update of the variable in Update(); In fact, I can do this, but Im looking for a DOTween solution. Is there any already made solution in DOTween?
Your answer
Follow this Question
Related Questions
leantween ltspline control points setup 0 Answers
Multiple DOTween animations in the same object 2 Answers
LeanTween, Problem with slower device when loop create and cancel tween in sequences 0 Answers
loop a chain of iTween actions 0 Answers
LeanTween, Tween canceled but still true when check isTweening. 0 Answers