Advanced Text Generator (ATG) is not enabled by default, and you need to enable it in your project settingsA broad collection of settings which allow you to configure how Physics, Audio, Networking, Graphics, Input and many other areas of your project behave. More info
See in Glossary.
With ATG, you can use a wide array of languages and 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, such as right-to-left (RTL) languages like Arabic and Hebrew.
You can use ATG in UI Builder, USS, and C# scripts. It’s best practice to set it in the root element of your UI hierarchy, so that it cascades to all child elements. If you want to use standard text rendering for specific elements, you can override the text generator type for those elements individually.
To use Advanced Text Generator in UI Builder, do the following:
VisualElement class. You can style the look, define the behaviour, and display it on screen as part of the UI. More infoTo use Advanced Text Generator in USS, set -unity-text-generator to advanced. The following USS example sets it for the root element:
:root {
-unity-text-generator: advanced;
}
To use Advanced Text Generator in C# scripts, set TextGeneratorType to Advanced. For example:
textElement.style.unityTextGenerator = new StyleEnum<TextGeneratorType>(TextGeneratorType.Advanced);
ATG has the following limitations: