Hello! I’m trying to have a sprite as a part of my text using Rich Text format but to no success. I’ve seen a few questions but with no concrete answers or even answers but I haven’t been able to achieve this.
I’ve already added the sprite i want inside “Assets > TextMeshPro > Resources > Sprite Assets”
But the sprite character table is empty. Shouldnt the sprite be visible here or it doesnt matter? I’ve tried adding <sprite="SpriteAssets" name="SpriteAtlas"> even like the other way around because I’m not actually sure which goes where. But the sprite isnt visible just all that as text.
I haven’t double checked, but I assume so. It’s ok to have a sprite sheet with just one sprite in it.
Most people will need more than one sprite, and it would be inefficient for TMP to load every image separately, so encouraging you to put them all on shared sheets makes a lot of sense.
Ahhh… Okay! Figured it out via the links u shared. Thanks! New to setting up sprites well to unity sort of. Thank you.
So for future reference (Coz I’m dumb like that):
Basically, if its just one image you can still set it as multiple then in the Sprite Editor just size the transform box to fit the image you want. Note the name of the sprite when you are doing this.
Then on the image, right click on it Create > Text Mesh Pro > Sprite Asset and it will create the sprite asset which will have the same name as the image but with like a blue icon with an S. I moved it to Assets / Text Mesh Pro / Resources / Sprite Assets , this step needs to be done in order for it to work.
Then in your Text Mesh Pro in the text field use <sprite="name of sprite atlas" name="name in sprite character table">