Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

TextMesh Pro More Disappearing Text

Discussion in 'UGUI & TextMesh Pro' started by sparrowsion, Feb 1, 2020.

  1. sparrowsion

    sparrowsion

    Joined:
    Mar 3, 2019
    Posts:
    8
    (Nothing to do with https://forum.unity.com/threads/disappearing-text.819846 .)

    I've got some TMPro text in a HUD (used for reporting the players location when they arrive somewhere new) which works absolutely fine when running the player in the editor. With a standalone build, though, it never pops up. Other transient TMPro text in the HUD, in the same font, works as expected. The only clue from the player log is

    ArgumentException: An item with the same key has already been added. Key: 0
    at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x000c1] in <437ba245d8404784b9fbab9b439ac908>:0
    at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <437ba245d8404784b9fbab9b439ac908>:0
    at TMPro.TMP_FontAsset.InitializeDictionaryLookupTables () [0x001bc] in <9db7f3fc02684bd086634195415c84b9>:0
    at TMPro.TMP_FontAsset.ReadFontAssetDefinition () [0x00021] in <9db7f3fc02684bd086634195415c84b9>:0
    at TMPro.TMP_FontAsset.get_characterLookupTable () [0x00008] in <9db7f3fc02684bd086634195415c84b9>:0
    at TMPro.TextMeshProUGUI.LoadFontAsset () [0x0009c] in <9db7f3fc02684bd086634195415c84b9>:0
    at TMPro.TextMeshProUGUI.Awake () [0x000a6] in <9db7f3fc02684bd086634195415c84b9>:0[/code]


    But the in-editor player generates the same (and always has, as long as I've been using TMPro).

    TextMesh Pro 2.0.1 installed as package in Unity 2019.3.0 on Linux, Mono backend, .Net 4.
     
  2. sparrowsion

    sparrowsion

    Joined:
    Mar 3, 2019
    Posts:
    8
    ETA: Never mind. Probably. Just updated TMPro to 2.1.0p3 and the problem's gone away. Also, TextStyles let me remove an unpleasant hack.