Question by
chalkesonali · Mar 29, 2016 at 04:58 AM ·
tagshtmlhighlightrichtextboxbold
Highlighing words in sentence one by one
I am making game in unity where i am having a sentence which i have to display in different forms for eg if i have a sentene "I am using Unity"
i want to display this text in textbox as:
<b>I</b><i>am using Unity</i>
<i>I</i><b>am</b><i>using Unity</i>
<i>I am</i><b>using</b><i>Unity</i>
<i>I am using</i><b>Unity</b>
This means one by one the words of the sentence should be displayed in bold and everything else in italic.
i have split the sentence in words and inserted each word in an array using
TextArray = sentence.split(null);
where null is the space in between the words now how should i loop through the array to create the above rich text pattern?
Comment
Your answer
Follow this Question
Related Questions
Scaling Unity WebGL Canvas causes a bad performance 0 Answers
Help with OnCollisionEnter 0 Answers
missing occluder tag 0 Answers
Unity won't print last item in my array for my GameObjects 0 Answers
Highlight Button not working 1 Answer