Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

TextMesh Pro TextMeshPro text doesn't show up in built game

Discussion in 'Unity UI & TextMesh Pro' started by HewwoCraziness, Jun 27, 2018.

  1. HewwoCraziness

    HewwoCraziness

    Joined:
    May 4, 2018
    Posts:
    6
    My TextMeshPro text shows up both in the Scene and Game tabs in the Unity Editor, but not once I've built the game. I've tried building for both Windows and Mac with the same result.


    (in game)


    (in editor)

    No build errors appear in the Unity console.

    Thanks,

    HewwoCraziness
     
  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,396
    If you are using the Canvas System, make sure that you are using the TextMeshProUGUI text component and not the normal TextMeshPro component designed to work with the Mesh Renderer.

    If you are using the correct, text component, please post an image of your scene hierarchy expanded so I can see the configuration. Also post an image showing the text object inspector and its parents.
     
  3. HewwoCraziness

    HewwoCraziness

    Joined:
    May 4, 2018
    Posts:
    6
    Thanks for the prompt reply!
    Here's one of my broken text components in the Inspector view (all TextMeshPro components, both UGUI and InputField are blank once the app is built, but they're visible in both Scene and Game views):


    Here's its parent button:


    And here's the button's parent canvas:


    Thanks,

    HewwoCraziness
     
  4. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,396
    Are you using a mixture of normal TextMeshPro objects and TextMeshProUGUI objects which would happen to be sharing the same material presets?
     
  5. HewwoCraziness

    HewwoCraziness

    Joined:
    May 4, 2018
    Posts:
    6
    All components using TextMeshPro are using the Text Mesh Pro UGUI script. Would you like me to upload my scene file?
     
  6. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,396
    A repro of the project / scene would be great.
     
  7. HewwoCraziness

    HewwoCraziness

    Joined:
    May 4, 2018
    Posts:
    6
    Sorry for the late response.

    Here's the MEGA link (252 MB): https://mega.nz/#!5cEAXAAZ!aGc28ueTqHC16T-hoOztfZXPnHXIT1FbUgVNM1ECuUI
    (Not sure if cloud service links are allowed, but there wasn't another obvious way to upload a large file.)

    The zipped version inside the archive (NetSet_Win.zip) is an outdated build where text still works.
    The folder version (NetSet_Win) is a very recent build where text is broken.

    Thanks so much!

    HewwoCraziness
     
  8. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,396
    Finally had a chance to look at the repro project.

    In order to debug the dll only version and since you are running Unity 2018.1, I updated the project to the latest version of TextMesh Pro which is 1.2.3. This version is available via the package manager in Unity 2018.1.

    Prior to importing the new version, (1) I closed the current scene by going to New Scene. (2) Then deleted the previous version of TMP by deleting the "TextMesh Pro" folder. (3) imported the new version using the Package Manager. (4) Imported the TMP Essential Resources and TMP Examples & Extras via the menu. (5) Since the new package manager version of TMP uses a new set of GUID and FileID, I used the included "Project Files GUID Remapping Tool" to convert the project to the new format.

    Subsequently I created a new build where I discovered the text was rendering correctly. I suspect the behavior was addressed by one of the fix I did in release 1.2.3.

    Give this a try and let me know how it turns out on your end.

    P.S. I noticed in your project that you are using a lot of GameObject.Find("...").GetComponent<typeOf>() in Update() which is very inefficient and something you want to avoid. I suggest instead you define public fields and assign these references in the inspector. This will be much more efficient.
     
    P_Jong likes this.
  9. P_Jong

    P_Jong

    Joined:
    Jun 14, 2017
    Posts:
    20
    @Stephan_B Thanks. This fixed my problem upgrading from 1.2.1 to 1.2.4. The text TextMesh Pro text shows up now in the build. Edit: I should mention I'm using Unity 2018.2.0b11 build. I'm a big fan of Textmesh and have been using it before it got integrated into Unity 2018.
     
    Last edited: Jul 7, 2018
    Stephan_B likes this.
  10. sharkapps

    sharkapps

    Joined:
    Apr 4, 2016
    Posts:
    85
    I am also having problems with TextMeshProUGUI text disappearing when playing the game on a device (iOS). Everything looks fine in the editor, but not on the device.

    I am using Unity 2017.3.1f1. Is there a way to get 1.2.3 or newer for 2017.3 builds?
     
  11. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,396
    I'll try to release version 1.2.4 (for 2017.4) next week. This version will work with 2017.3.
     
    P_Jong likes this.
  12. HewwoCraziness

    HewwoCraziness

    Joined:
    May 4, 2018
    Posts:
    6
    Worked great, thanks! (Didn't realize I had missing variable definitions; thanks for the notice.)