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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
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();
}