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?