Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  4. 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,616
    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,616
    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,616
    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,616
    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:
    23
    @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:
    87
    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,616
    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.)
     
  13. lassade

    lassade

    Joined:
    Jan 27, 2013
    Posts:
    57
    I'm having this same issue with 2018.2.0f2 and TMP 1.2.4, from package mananger. TextMeshPro objects show as normal, TextMeshProUGUI in other hand are empty in all my builds.

    Edit:
    I'm building for Android;
    1.2.3 does not work;
    1.3.0-preview also does not work;

    Using canvas in Screen Space - Camera is the only way to make the text show up.
    Screen Space - Overlay does not work for any of the latest packages.
     
    Last edited: Jul 30, 2018
  14. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,616
    See if any of the example scenes like 17 - Old Computer Terminal work correctly for you? Based on the information you provided it should since it is using a Screen space overlay.

    Then modify that scene to have the camera in screen space camera and see if that still works?

    I'll do some testing on my end as well.
     
  15. lassade

    lassade

    Joined:
    Jan 27, 2013
    Posts:
    57
    The scene 17 is working fine, but my scene is not working. I'm not sure what i'm doing wrong, at glance both the text componenets and canvas have the same setup apart from the font and aligment, I'm using the default LiberationSans SDF, center-middle
     
  16. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,616
    Are you using a mixture of normal <TextMeshPro> and <TextMeshProUGUI> components where these happen to share the same material?

    If so and as a result of the Canvas Renderer and Mesh Renderer having different requirements in terms of ZTest settings, these two systems end up fighting each other. To resolve the issue, simple use a different set of material presets for the Canvas system vs. the Mesh Renderer.
     
  17. ledbetterman

    ledbetterman

    Joined:
    May 5, 2015
    Posts:
    60
    I'm having the same problem. TextMeshPro v1.2.4, installed via package manager in Unity 2018.2.2.f1. Running Unity on a Mac running High Sierra 10.13.4.

    Everything looks fine in the editor, builds and shows all expected GUI elements minus text. I haven't mixed text mesh components (all UGUI).

    Building for Windows works fine, though that build was built on windows using the prior version of 2018.2 (i think it was the 2018.2.1f1??) I'm working on the same project on my mac via Collab and updated it to the newest version of 2018.2.

    Any assistance would be great.

    Edit:

    Tried setting my UI to Screen Space - Camera to no avail. I tried changing Text Mesh Pro materials from mobile to standard. This also did not resolve the issue.
     
    Last edited: Aug 4, 2018
  18. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,616
    Do any of the example scenes included with TextMesh Pro exhibit the same behavior?
     
  19. ledbetterman

    ledbetterman

    Joined:
    May 5, 2015
    Posts:
    60
    Yep, can confirm I'm having the same issue in the Single Line TextMesh Pro scene and the Old Computer Terminal test scene.
     
  20. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,616
    Just to confirm, Unity 2018.2.2 simply creating / running a Standalone build on Windows or OSX?

    Update: Just tested a Standalone build on Windows using Unity 2018.2.0f2 and both scenes ran and rendered correctly.

    Also tested the same two scenes on Unity 2018.2.2f1 and they also ran and rendered as expected.

    What graphic settings are you using? Graphic API? Resolution?

    What scripting backend?

    Are you getting any errors if you run a development build?
     
    Last edited: Aug 5, 2018
  21. ledbetterman

    ledbetterman

    Joined:
    May 5, 2015
    Posts:
    60
    No, the build with the issue is on Mac High Sierra on a 2016 Mac Book Pro. The Windows builds work fine for me too.

    I'm using the standard/legacy rendering pipeline with all default settings. Gamma color space with "automatic graphics API" selected for Mac. Resolution is variable; I've jumped between windowed and full screen. There appears to be a split second of dots on the screen before the scene view pops in completely, but it's so quick that I can't tell if it's artifact of text mesh pro or just the first rendered frame popping on screen.

    As for scripting back-end, it's Mono and the API compatibility level is .Net 4.x equivalent.

    I'm getting no errors whatsoever.
     
  22. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,616
    I'll try testing on my MacBook Pro later tonight or tomorrow and provide feedback thereafter.
     
    ledbetterman likes this.
  23. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,616
    I just ran those scene on the MacBook Pro using Unity 2018.2.2f1 and they also rendered and worked as expected.

    See if you get the same behavior in a new project using those same example scenes?

    Note that you will need to import the TMP Essential Resources as well as TMP Examples and Extras.