Is it possible to have more than one color within a Label text string? (Editor code)

Hello,
I want to say prior to UI Toolkit, it was possible to have a string of text and change it’s color midway through the text by doing something along the lines of “<color=WhateverColor> This is a text string”. Is there a way to accomplish something like this with a UIElement Label in editor code without having to just have several separate labels lined up in a row, or is that the only option?

Thanks,
-MH

This will come in 2021.1. It’s already functional. We’re just polishing and getting it out the door.

3 Likes

It’s working for me (Unity 2021.1.23)

Don’t have an account? <color=#FA917D>Sign Up</color>

it feels a bit backward though. It would be much more consistent and powerful to be able to add inline level elements just like in HTML.

Great to see that it is in now, but, unfortunately, DOTS is not supported in 2021.x. I am stuck on 2020.x until, well, whenever, I guess.