• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by DarkSlash · Sep 08, 2015 at 03:14 PM · floattween2dtoolkittweening

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?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

27 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

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

Is there in Unity something like Tween-effects? 1 Answer

DOTween & how to undo SetBlendableScaleBy tweens that get killed 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges