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
- ComputeBuffer readback fails when Render Graph is enabled
- Opening Terrain Prefab in Prefab Editing Mode throws "NullReferenceException" error
- [Search] Dragging query pills put them behind the search text field
- A CustomPropertyDrawer that returns a PropertyField for a property named the same as a child field will not render all child fields
- Graphics Settings shows default values instead of the real values in the Rendering Debugger when Volume.profile is assigned via script
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();
}