- Home /
Any way to use multiple font styles within a single UI Text component?
Hey all,
I'm working on implementing a dialogue system right now, and if possible I'd like to be able to use multiple font styles (bold, italic, etc.) and colors within a single text box. After looking into it a bit, the only solution I've found is to use multiple text boxes for different styles and align them next to each other, but since I'm using a dynamic system where I'm generating my text one character at a time, and the size of the text box will be variable depending on size and screen resolution, the task of getting multiple text boxes to align and interact properly seems nigh-impossible to me. If anybody out there knows if it's possible to change font style within a text component via script or has tackled a similar problem to mine, I'd really appreciate the help!
Thanks!
Answer by achand004 · Oct 09, 2016 at 10:17 PM
So just in case anyone was wondering, I got it figured out. I feel kind of stupid for not realizing this sooner, but Unity supports HTML-style rich text tags that can do this for you.