Coin and Dynamic Text Show with Proper Spacing

I have to write dynamic coins text and on left side, I have to display coin symbol too.
Coins text is completely dynamic for some players its in hundred or for some players its in millions as like you are seeing in the below image:

8194788--1068660--thumb_Capture.PNG

I have try to setup dynamic length text component but its not working 100% perfectly so let me show you what I have implemented so you can share your suggestion to me:

I have shown you complete setup in 3 separate partitions, this working for 2 to 3 characters then after it starts overlapping coin symbol.
How to display coin and dynamic coins text properly? so they have proper spacing between them.

I would recommend making the coins part of the text by creating a sprite asset that contains your coins and then using the tag to display them.

For more information on this, take a look at the examples included in the TMP Examples & Extras. More specifically look at “10 - Bullets & Numbered List Example” which uses sprites inline with the text to display the digits.

The benefit of using sprites inline with the text is that given sprite have text metrics, they behave just like any other character where you don’t have to try to align stuff, etc… Since sprites can be referenced by index, name and Unicode in the text, this will make achieving what you want trivial.

So take a look at the examples referenced above and follow up with me when you have more questions.

2 Likes

Thank you sir, I will try this and provide you feedback :slight_smile: