A “Sprite Asset” in unity is what allows you to enter rich text like <sprite index=X>
or <sprite name=Name>
to insert a sprite into your TextMeshPro. This is really useful for inserting icons into text without directly adding them into your font
There are a few problems currently:
A. The TextMeshPro/Sprite
shader is unsupported, however, this can be replaced with RecRoomStudio/Unlit
, but it may look different
B. NullReferenceExceptions when done with Text Mesh Pro - UI
, the text will cause errors and stop updating until the rich text is removed, as errors are caused each time it attempts to render the sprites preventing it from updating the texxt
The only way this is possible currently is Text Mesh Pro - Text
, the 3D object version, but this method is much more expensive, using a new draw call for every single text object. Text Mesh Pro - Text
also does not follow the same UI rules as Text Mesh Pro - UI
, as its not meant to be a UI object (eg. it cant be masked, and wont follow alpha with its Canvas Group), so it is not possible for all users, especially in my case, which is why I am making this post