I have a sprite asset with one index, but when I type
it doesn’t show the image.
- Create Sprite Asset out of your sprite or Sprite Atlas.Sprite Asset should go into Resources folder
- Check name (the name to use in tag)
- Mark your Label as RichText enabled. Can do it by code or in UIBuilder
- Add tag in your text.
Not sure what I did wrong… It just doesn’t work for me
I fotgot about one last setting (Text Settings) in Panel Settings. Take a look at the screens. (Unity - Manual: Panel Text Settings assets)
Thank you very much, that was the problem! Do you know how to center the sprite in the text?
Yes, the text is set to middle, and the image is just of the coin.
How to set the inserted image layer? I would like to make the image above / beneath the text. How can we control that?
IDK how it is in later Unity versions, but in 2021 LTS this changed: you have to create a UITK Text Settings and on it you set the the sprite asset to be used and its path - those settings are not in the panelsettings anymore.
Then on panelsettings you select the UITK Text Settings you created.
Also, to show the glyph: <sprite=“sprite_name” index=0>