Is it possible to use scripting to add rich text facilities to xml produced content?

I deal with xml files that contain text (psychology questionnaires) for example, the following xml line is read in by a simple FromXML() function and displays in the Unity Editor a title:

<title>Please describe how you feel now.</title>

The following code is responsible for displaying the above in my editor:

GUILayout.BeginHorizontal( displayStyle1 );
displayStyle1.fontSize = 20;
GUILayout.Label( Title, displayStyle1 );
GUILayout.EndHorizontal();

I decided to make the word “now” show in bold or perhaps underlined, so I inserted the following line in my code:

displayStyle1.richText = true;

and then changed the xml content to:

<title>Please describe how you feel <b>now</b>.</title>

But it is not making any difference. What am I missing or doing wrong?

p.s. Please note that I need the title tags to read in my pre-defined title; i.e. I have my own readFromXML and writeToXML functions, so title tags are necessary… I guess my question is how can I enforce rich text styles within other xml tags? Or perhaps modifying my code somehow?

What text does get shown by the GUILayout.Label exactly?
Does it show the tags or not?

Maybe you need to use CDATA to prevent the xml parser from interprating your text tags
Starts

http://www.w3schools.com/xml/xml_cdata.asp

Hi fffMalzbier,

GUILayout.Label shows the text between title tags, which is: Please describe how you feel now.

When I wrap a word between tags and run the app, the editor shows the same title, with no and no effect either, as if they do not actually exist…

Thanks