Hello, today we are excited to share with you the last major addition to UI Toolkit 1.0, namely the integration of a text engine coming directly from Text Mesh Pro. The name of this engine is TextCore and is being directly integrated into Unity, with the long term goal of supporting the entire ecosystem (including migration of existing Text Mesh Pro users).
The TextCore engine has a set of characteristics that makes it much more appealing for UI Toolkit developers:
Clear separation of text layout, mesh generation, and rendering operations of text objects
Signed Distance Field capabilities, which bring performance improvements and less memory overhead for multiple text sizes
Ability to embed static font data and limit dependencies on FreeType in the future
Since the engine is a direct adaptation of Text Mesh Pro, so it allows us to actually support many equivalent features and continue our journey towards parity with UGUI & TMP.
Getting started
Please have a look at this getting started guide to learn more about what this new release gives you access to.
Known issues
Currently the only known bug for this feature is the following:
As much as possible we will keep this list updated for your information
Next Steps
You can expect a UI Builder update very soon in order to work with the new Font Asset support and other text options.
In future releases, we have some plans for the following improvements:
Support rich text strings for TextFields
Improve the readability of Rich Text Tags in raw UXML
Support for whitespace CSS properties
Support for paginated text elements
Support for tags
We’re eager to hear your feedback on these new features ! Please let us know if this is matching your needs and what you’d like to see prioritized.
Hi,
thanks for adding this feature set! I’ve been really looking forward to it, keep up the good work. I would like to know if text-shadow is supposed to work on Buttons? Because it seems it only works on Labels (I’ve only seen TextField being mentioned as not working yet).
I noticed that paragraph spacing, word spacing, and character spacing are supported, however, I don’t see line spacing. Is this something that is coming soon?
Can you make this one the default and if you want to keep the other text options available to users for backward compatibility make those older versions into packages they can install? I don’t like that obsolete features are default and new features are packages you have to hunt for, install and manage versions yourself… it makes no sense.
I would like it when the ui builder supports the “Text Panel Settings”.
I have a font asset with a fallback font with special characters, and at the moment those are not shown in the uibuilder. because it doesn’t know the fallback font.
I would like it when the ui builder supports the “Text Panel Settings”.
I have a font asset with a fallback font with special characters, and at the moment those are not shown in the uibuilder. because it doesn’t know the fallback font.
The next version of the UI Builder will enable users to specify a FontAsset as well as set new Text properties (Text Shadow, Text Outline) & support rich text for all text elements (except TextField). Text Settings is specified via Panel Settings, which will come at a later time.
The tag only affects the geometry of the characters and not the metrics. As such, the Advance (spacing between characters) is not adjusted which can result in characters overlapping as most of the time their height is greater than their width.
Having said that, what is your use case for the tag?
BTW: Most of the projects I have seen using the tag in TMP were to sort of style and in some case animate the characters using small rotation angles.
P.S. Please consider making a separate thread for this as it will make it easier for us to continue our conversation about the tag and for other users to find it as well over time.
The general state of how unity is being developed at the moment is to put all new features into packages that need to be installed separately and also updated separately to the main unity build. I understand why this is the case but I think you need to reverse it. Make unity automatically start with the latest and greatest systems, eg text mesh pro over text mesh and allow users to install older systems through the package manager if they require it for backward compatibility rather than the other way around, especially if that older system is considered obsolete.
This is really nice, one feature I am missing that was not mentioned is sprites respecting text order e.g. if sprite has AD < width the following text overlaps the sprite.
A common use case is the sprite with Zero Advance being used to define some shape (a coin for instance) where a subsequent character (a number) with adjustment pair defined between the two is displayed on top of the sprite.
What is the use case for subsequent character to be under the sprite?
I could have been more clear, sorry. Your use case is exactly what I had in mind. I am setting AD=0 and the text is behind the sprite. E.g.<sprite=0>10 leads to only the sprite being visible.
Let me see if I can figure out a way to make this work.
Can you think of a use case where we would not want the subsequent character to be on top of the preceding sprite? Ie. Maybe sprites should always be rendered first.
I personally can’t really, but you might want to be careful as I guess that works by drawing a tinted sprite over the text, so this change could turn it into a tag instead. Which could be useful as mark changes the text’s color and has to have alpha making background visible.
I can confirm that text-shadow doesn’t apply to Buttons or Labels that have the Background property set to a color.
I have a few Labels that have backgrounds that don’t get the shadow. I am using a label for the element in a ListView that sets the background when the item is selected. The shadow disappears when selected and when the item isn’t selected it has the shadow again.