Search Issue Tracker
Won't Fix
Votes
12
Found in
6000.0.55f1
6000.2.0f1
6000.3.0a4
Issue ID
UUM-113958
Regression
No
TMP_FontAsset fails to change when the Fallback Font Asset is changed
Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/Scenes/SampleScene.unity” Scene
3. Enter the Play Mode
4. Press the Button with the text "Switch to Japanese"
5. Observe the character
Expected result: Character changes to Japanese and has the vertical line on top
Actual result: Character stays the same
Reproducible with: 6000.0.55f1, 6000.1.14f1, 6000.2.0f1, 6000.3.0a4
Could not test with: TMP 3.0.6 (2023.1.0a1) (NullReferenceException: Object reference not set to an instance of an object)
Reproducible on:
Play Mode
Windows Standalone Player
Testing environment: Windows 10 Enterprise 21H2
Not reproducible on: No other environment tested
Note:
- Reproducible even when forcing a mesh update on text mesh
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Font character thickness does not adjust properly in UI Toolkit text when changing Bold Weight in Font Asset
- Multiple "[...] is inaccessible due to its protection level" errors are thrown when opening project with Unity Version Control installed
- Font character thickness does not adjust properly in UI Toolkit text when changing Bold Weight in Font Asset
- Sorting icons are tiny and misaligned in Import Activity window
- The Undo system does not record HideFlags.HideInHierarchy changes
Resolution Note:
Changing a FontAsset’s fallback order at runtime has no effect, as the cache still references the old fallbacks. The following API TMP_ResourceManager.ClearFontAssetGlyphCache() clears the caching.
private void SetFont(TMP_FontAsset font)
{
mainFont.fallbackFontAssetTable.Clear();
TMP_ResourceManager.ClearFontAssetGlyphCache()
mainFont.fallbackFontAssetTable.Add(font);
textMesh.ForceMeshUpdate();
}