Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

TMPro not rendering

Discussion in 'UGUI & TextMesh Pro' started by JelleTorres, Jan 23, 2020.

  1. JelleTorres

    JelleTorres

    Joined:
    Apr 25, 2018
    Posts:
    9
    When i build my game for an Iphone, everything works but not the rendering of my TMPro text.
    I know they are there because some of them have a button component that does work.
    I checked other threads about this but the all mention having TMPro as UGUI and non UGUI. My project includes only UGUI elements of TMPro but is has the same issue. I have no clue how to solve it.

    Also when is run the app on my iphone Xcode tells me this about TMPro:

    2020-01-23 13:47:49.682774+0100 Snakes[8034:2925149] Unbalanced calls to begin/end appearance transitions for <SplashScreenController: 0x10863c0d0>.

    UnloadTime: 3.553333 ms

    Failed to find expected binary shader data in 'TextMeshPro/Sprite'.

    UnityEngine.Resources:Load(String)

    TMPro.TMP_Settings:get_instance()

    TMPro.TMP_Settings:get_warningsDisabled()

    TMPro.TMP_Text:GetSpecialCharacters(TMP_FontAsset)

    TMPro.TextMeshProUGUI:LoadFontAsset()

    TMPro.TextMeshProUGUI:Awake()


    If anyone has a clue, help is welcome.
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The above looks like some build issue or shader compilation issue.

    Are you using any special options like compression, code stripping, etc in your build settings? I would review those.

    See if using the mobile distance field shader makes a difference.
     
  3. JelleTorres

    JelleTorres

    Joined:
    Apr 25, 2018
    Posts:
    9
    I'm already using the mobile distance field shader and did not mess with the build settings.
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    See if creating a new scene with just a single text object works as expected. This would enable us to gradually figure out what might be causing the issue in your current scene.
     
  5. JelleTorres

    JelleTorres

    Joined:
    Apr 25, 2018
    Posts:
    9
    I did make a new scene with only a TMProUI text element and made it the 1scene to pop up but the text didn't render.
    After that I made a new project. one with only a TMProUi text element. set my built settings to IOS and built it and again it doesn't render the text.

    the version of unity I'm using is:
    2019.2.13f1
    And I think the version of TMPro it imports is:
    2.0.1
     
  6. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Does the text render correctly in the Editor?
     
  7. JelleTorres

    JelleTorres

    Joined:
    Apr 25, 2018
    Posts:
    9
    yes it does
     
  8. JelleTorres

    JelleTorres

    Joined:
    Apr 25, 2018
    Posts:
    9
    it's all looking fine in the game window, the. scene window. If I hit play it shows correctly only when I build it it fails
     
  9. JelleTorres

    JelleTorres

    Joined:
    Apr 25, 2018
    Posts:
    9
    I did just try a build for pc(Mac) and that does works fine as wel.
     
  10. ldaughtry

    ldaughtry

    Joined:
    Oct 30, 2012
    Posts:
    38
    I'm seeing a similar behavior with Unity 2019.1.14f1 and the TMPro 2.0.1. Perhaps some race condition?

    NullReferenceException: Object reference not set to an instance of an object
    at TMPro.TMP_Settings.get_warningsDisabled () [0x00005] in <11959811b5564101b217ed0f076018f6>:0
    at TMPro.TMP_Text.GetSpecialCharacters (TMPro.TMP_FontAsset fontAsset) [0x000a0] in <11959811b5564101b217ed0f076018f6>:0
    at TMPro.TextMeshProUGUI.LoadFontAsset () [0x0019b] in <11959811b5564101b217ed0f076018f6>:0
    at TMPro.TextMeshProUGUI.Awake () [0x000a6] in <11959811b5564101b217ed0f076018f6>:0
     
  11. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I already revised how Truncation and Ellipsis are handled with respect to the parsing of the text to remove the use of recursivity. This change is present in the latest release which is 2.1.0-preview.4.

    I am now revising the handling of Special Characters like Underline and Ellipsis to make it possible for those to come now come from any font asset as opposed to requiring them being present in the Primary font asset. The new implementation will be much more flexible as well as address newly uncovered issue when the primary doesn't contain those special characters.
     
  12. JelleTorres

    JelleTorres

    Joined:
    Apr 25, 2018
    Posts:
    9
    I made a stitch to unity 2019.3 this did work fine. other than a new issue that occurs. One that doesn't have anything to do with TMPro.