More convenient text customization

I learned not so long ago that Unity is developing a new UI system, I was wondering if it’s going to support better customization like the ability to change colors of letters in a single Text (TextMeshPro) rather than having to create a new text for each color.

Thanks.

The UI will be using TextCore which is an updated version of TextMeshPro.
Are you aware that you can use RichText to change the color of text? You don’t need to create a new text for each color.
E.G

1 Like

Thanks for the answer,

I wasn’t aware of RichText, apparently it’s doing just that and more.

1 Like

It is very interesting! But if we need to write code inside the editor, will you add intellisense like a IDE?

What do you mean? You want to change the text color so people can type like an ide?
You would do this by having 2 versions of the text, 1 is the original and the other is the version that has been parsed and populated with color tags, this one gets displayed but the other version is what you edit. We already do this for the InputField when you are using IME. Im not aware of us adding additional support for this at the moment though.

1 Like

That link seems to be missing several tags that can be used with TextMeshPro, this one has all (AFAIK): https://docs.unity3d.com/Packages/com.unity.textmeshpro@4.0/manual/RichText.html. It’s indeed possible to do a lot with them.

1 Like

Yes there are some tags that are not supported fully in TextCore that are supported in TextMeshPro. We are working on closing this gap so UI Toolkit has the same functionality as TextMeshPro does for uGUI.

1 Like

Is that TextCore is only for UI Toolkit runtime UI or it also can support uGUI?

TextCore is currently UI Toolkit but parts of TextMeshPro are now using it. It will gradually over time shift more to TextCore but from a UGUI standpoint you wont notice, you will still be using TextMeshPro with UGUI.

Does it mean TextMeshPro with UGUI won’t get any more improvement like making multiple different font asset render 1 batches instead increase 1 batches per different font asset?

Thats not a limitation of TextMeshPro but of uGUI, so in this case you would be correct i dont think we’d ever get to that state of 1 batch for fonts.

I meen this:
https://docs.microsoft.com/en-us/visualstudio/ide/using-intellisense?view=vs-2022

If we need to write code inside the editor, then we would like to have such tools.

There are no plans to add anything like this at the moment.