Hello ,

Im struggling a little to display the icon of my currency on the button that display the item in the shop(listbox) the player can buy.The weird part is that in another project this part worked and now I have a white square instead in that project.
So far I try lot of thing in my new project :
-In the text display settings in buy price text I used the text code: .
-In list box using dditionnal content with built-in ID content(icon) + custom(link to the currency).
-Of course update my button giving it a extra info content,trying the 2 textcode.
If I set 2 additionnal content in the same Info content ,nothing display like if there is a conflict.
If I set only 1 additionnal content only the text that display the value of the currency work
If I set 1 additionnal content in 2 different Info content component at best the value of the item display+the name of the currency + the icon of the item itself but in any of theses tries I managed to display the icon of the currency.

Im almost sure Im missing something obvious(like almost all the time when I use the forum),what could be the issue?
  • edited June 2023
    Ok I found a way ,I had to create a sprite atlas for TMP.
    Is there something simplier than that or another method because the icon is very small and can't change it?
    Post edited by omeegaa on
  • edited June 2023
    You can make the TMP Sprite Sheet sprites larger by messing with the point size and scale settings in the TMP_Sprite asset file:

    image

    As long as the sprite you used to create the sheet is of the same/similar size, it should retain it's resolution too.
    Post edited by Acissathar on
  • For icons used in text (via text codes), the TMP sprite sheet is the way to go.
    You can also add currency icons by adding HUD content to your shop's layout (or just to the UI boxes). Or e.g. check out the currency HUD tutorial.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited June 2023
    Wrong post.
    Post edited by tmerl on
  • Yeah icon with the sprite sheet seems to be better in this project ^^
Sign In or Register to comment.