Use the legacy Text Core in UI Toolkit
Enable and use the legacy Text Core in UI Toolkit.
읽는 시간 1분최근 업데이트: 15일 전
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# scripts.
In UI Builder
To use the legacy Text Core in UI Builder, do the following:
- Select the (root) visual element that you want to apply to.
- In the panel, select Inlined Styles > Text.Inspector
?
- From the Text Generator Type dropdown, select Standard.
In USS
To use Text Core in USS, set to . The following USS example sets it for the root element:
-unity-text-generatorstandard:root { -unity-text-generator: standard;}
In C# scripts
To use Text Core in C# scripts, set to . For example:
TextGeneratorTypeStandardtextElement.style.unityTextGenerator = new StyleEnum<TextGeneratorType>(TextGeneratorType.Standard);