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.
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.
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 the MEGA link (252 MB): MEGA
(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.
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() 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.
@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.
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?
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.
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?
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
Are you using a mixture of normal and 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.
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.