Version: Unity 6.5 Beta (6000.5)
Language : English
Create custom text animation
Migrate static font assets to Advanced Text Generator

Use the legacy Text Core in UI Toolkit

If for some reason you need to use the legacy Text Core in UI Toolkit, you can enable it in UI Builder, USS, and C# scriptsA piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info
See in Glossary
.

In UI Builder

To use the legacy Text Core in UI Builder, do the following:

  1. Select the (root) visual elementA node of a visual tree that instantiates or derives from the C# VisualElement class. You can style the look, define the behaviour, and display it on screen as part of the UI. More info
    See in Glossary
    that you want to apply to.
  2. In the Inspector panel, select Inlined Styles > Text.
  3. From the Text Generator Type dropdown, select Standard.

In USS

To use Text Core in USS, set -unity-text-generator to standard. The following USS example sets it for the root element:

:root {
    -unity-text-generator: standard;
}

In C# scripts

To use Text Core in C# scripts, set TextGeneratorType to Standard. For example:

textElement.style.unityTextGenerator = new StyleEnum<TextGeneratorType>(TextGeneratorType.Standard);
Create custom text animation
Migrate static font assets to Advanced Text Generator