Rich Text and How is this done in Custom Editor or Inspectors?

How does Unity change the color of individual characters in Text fields in the Inspector?

Using GUIStyles, we can change the color of all the text but how is this done on a character per character basis and is that functionality exposed to us?

If so, how?

Can anyone shed some light on this?

How about the Unity Gods :slight_smile:

There isn’t a way to do it on a character-by-character basis in the inspector.

–Eric

Whatever “under the hood” functions the Unity Gods are using to have text change colors in the Inspector when using Html tags, I hope they expose it to us at some point :slight_smile:

There is no such functionality as far as I know. There’s little use of colored text in the inspector, and on those occasions when they do, I expect they just use GUI.color.

–Eric

First! Thank you for the replies :slight_smile:

When you enable Rich Text. You can then type HTML Color tags which gives you this…

As you can see, the letters have different colors. Those html tags are getting parsed and individual colors are being assign to one or more characters. How are they assigning those colors? GUI.color or other means affect the whole string in TextFields and all.

1097439--41242--$Text Mesh.jpg

That is Unity4 only.
Unity 3 will be around for a while, after Unity4 takes over, maybe they expose it. Proly not.