Using TextMeshPro
Enabling TextMeshPro Module
To start using TextMeshPro in Delight follow these steps:
-
Import the latest TextMeshPro package into your project. You can do this through the package manager.
-
Import the Essential TextMeshPro Resources, through
Window -> TextMeshPro -> Import TMP Essential Resources
-
Open Content/Config.txt and add the TextMeshPro module:
Config.txt
Modules: TextMeshPro
This makes it so all Label and InputField views uses TextMeshPro components and enables additional TextMeshPro specific properties to be set. Any fonts and materials you use need to be converted to TextMeshPro font assets using the Font Asset Creator utility accessed at
Window -> TextMeshPro -> Font Asset Creator
Upgrading TextMeshPro
If you already have the TextMeshPro module enabled and want to upgrade TextMeshPro, follow these steps:
- Open Content/Config.txt and remove the TextMeshPro module.
- Make sure the views are rebuilt and make sure the code compiles - you might need to temporarily comment any custom code-behind that accesses TextMeshPro properties.
- Upgrade the TextMeshPro package.
- Add the TextMeshPro module back to Config.txt
- Uncomment any code you had to comment.
Disabling, upgrading and then enabling the TextMeshPro module again ensures that the framework can scan the new TextMeshPro components and add the necessary dependency properties for them.