Rich Text Quad Problem

I would like to use rich text “quad” tag to insert some icons into my strings. To use it I need to set a material. I’m new to Unity and never used materials before. It seems that materials are set per renderer, but there are multiple renderers for different UI elements. Should I add that material to my Text renderer or to my Canvas renderer? Does material counting start from 0 or from 1? I’m doing everything through scripts.

1 Like

per most array/list structures, it starts at 0

1 Like

To bad that “quad” tag is supported only for Text Mesh which can’t be placed directly on Canvas. :confused:

I want to use this feature too.

http://docs.unity3d.com/Manual/StyledText.html
On this page there is an example:

What is this “material”?

1 Like

This feature is not supported with UI Text and the Canvas system.

If you absolutely need such functionality with the Canvas system, you might want to consider TextMesh Pro which is a replacement Unity’s UI Text component as well as Text Mesh.

TextMesh Pro includes over 30 Rich Text Tags including the and tag as seen below where different fonts and sprites can be used in the same text object.


Animated GIF showing the new Multi Font & Sprites feature available in TextMesh Pro.

Five years later it looks like this still isn’t answered. I’ve tried all kinds of combos and only TMP seems to do this. Question: Why is it still in the documentation for Unity’s standard StyledText?

1 Like

5 years later I’m still unable to figure out how to add the material. You clearly did not need the question “what is this material” answered if you were at least able to do it with TMP. Question is how do you do it even with TMP?

When I try “” it just renders the literal text.

Is it because I am missing the “material” and if so where do I add these “material”?

EDIT: In case anyone’s still wondering, I think I ended up using sprites and sprite atlas instead.