Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

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

Discussion in 'Unity UI (uGUI) & 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:
    3,049
    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.
     
    forestrf likes this.
  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:
    3,049
    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:
    3,049
    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:
    3,049
    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:
    49
    @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:
    133
    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:
    3,049
    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:
    59
    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:
    3,049
    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:
    59
    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:
    3,049
    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:
    70
    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:
    3,049
    Do any of the example scenes included with TextMesh Pro exhibit the same behavior?
     
  19. ledbetterman

    ledbetterman

    Joined:
    May 5, 2015
    Posts:
    70
    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:
    3,049
    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:
    70
    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:
    3,049
    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:
    3,049
    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.
     
  24. K1kk0z90_Unity

    K1kk0z90_Unity

    Joined:
    Jun 2, 2013
    Posts:
    82
    I am having the very same problem using Unity 2019.1.0f2 with TextMeshPro 2.0.0. Building on Android it works fine. Building for iOS using Unity Cloud Build results in not showing all TextMeshPro texts. Furthermore, TMP_InputField also doesn't work.

    I think I'll have to use Unity built-in UI components only, otherwise I'm stuck not being able make a proper build on iOS.
     
  25. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    3,049
    Please update to version 2.0.1-preview.1.

    I'll re-run tests on iOS but that should all be working as expected. Do you get any errors when building for iOS via Unity Cloud?
     
  26. KazYamof

    KazYamof

    Joined:
    Jun 26, 2015
    Posts:
    53
    When I build to Android, none of my text are being displayed.
    Neither the TMProUGUI for canvas or TMPro attached to an object at world space.

    Works fine in Unity Editor.
    2019.1.2 and TMPro 2.0.1
     
  27. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    3,049
    Are you able to provide some repro of this for me to look at?
     
  28. tbriley

    tbriley

    Joined:
    Sep 10, 2013
    Posts:
    110
    Are you using different assets + materials for the ugui and world space objects as suggested above? This has cleared up the issue for me. Along these lines, @Stephan_B any chance we could get this idiot proofed in a future release? At the very least, the behavior of the editor and builds should be consistent, but ideally it all 'just works' in some fashion.
     
  29. tbriley

    tbriley

    Joined:
    Sep 10, 2013
    Posts:
    110
    Actually, I take back what I said. I also have this issue with TMPro and cloud build for iOS. @Stephan_B is this something you've been able to reproduce yet? My setup is quite simple, latest Unity, TMPro 2.0.1. I'm only testing world space elements, and have already assigned them a unique material (though I'm not using any UGUI components anywhere anyway).
     
  30. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    3,049
    If you have a project where you can reliably reproduce this, please do submit a bug report with the included project and provide me with the Case # once you have it.

    In terms of the overlap on materials, it is using a mixture or normal <TextMeshPro> object with <TextMeshProUGUI> objects where they share the same materials.
     
  31. tbriley

    tbriley

    Joined:
    Sep 10, 2013
    Posts:
    110
  32. mrm83

    mrm83

    Joined:
    Nov 29, 2014
    Posts:
    217
    We are having the same issue.

    There is no mix and match of materials with UI/non UI elements. The scene is only using Unity Text and TMPROUGUI elements.

    This does not happen to all our users, only some users experience this while it is fine for others.
    How to debug what the cause is?
     
  33. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    3,049
    Does it happen only on certain devices?
     
  34. HaakonL

    HaakonL

    Joined:
    Mar 13, 2014
    Posts:
    113
    Hi, we are building with Unity Cloud Build and some texts are rendered in the center of the screen on Android, no matter what we do to place them correctly. We are using the "hack" with different materials mentioned above.

    2019.1.10, TMPro 2.0.1.
     
  35. HaakonL

    HaakonL

    Joined:
    Mar 13, 2014
    Posts:
    113
    One important finding here is that the texts are rendered at the correct spot if we use Vulkan rendering. With OpenGLES they end up in the center.

    We're using the TextMeshPro/Mobile/Distance Field shader, and the issue is with the 3d tmpro text component.

    Also running with LWRP, version 5.16.1.
     
    Last edited: Jul 25, 2019
  36. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    3,049
    Can you submit a bug report and include the project for us to look at?

    Please provide the Case # once you have it.
     
  37. HaakonL

    HaakonL

    Joined:
    Mar 13, 2014
    Posts:
    113
    We did not have the time to do this, fixed the issue by changing to the regular text component instead of the 3d. But the bug is easy enough to replicate - place a tmpro 3d text component in a canvas off-center. Build with Vulkan for Android - text correctly placed. Build with OpenGLES3 for Android - text incorrectly placed.

    Sorry for not creating a sample project for you, we're dealing with too many Unity bugs in 2019 and simply can't spend more time on issues where we are able to find workarounds. Unity 2019.1 has been a disaster for us, costing us thousands and thousands of dollars in lost time due to serious bugs, but it is unfortunately a requirement when we need LWRP.
     
  38. pxlshdr

    pxlshdr

    Joined:
    Jan 14, 2017
    Posts:
    1
    I have had the same issue.. the 3d Textmeshpro object render fine on Opengles2 and 3, but fails when I build to Vulcan. pretty sure this has something to do with it:

    Flip Space Coordinates
    Clip space coordinates differ by API. These are the coordinates that are output by your vertex shader and are consumed by the rasterizer. Each API's conventions are as follows:

    Format: [MinX,MaxX][MinY,MaxY][MinZ,MaxZ]

    • Direct3D11 and Metal: [-1,1][-1,1][0,1]
    • Vulkan: [-1,1][-1,1][0,1] NOTE: Vulkan's clip space Y axis is inverted compared to other API's.
    • OpenGL (ES): [-1,1][-1,1][-1,1]