TextMeshPro Files can cause currupted builds with Unity 2020.2.1

Since the latest UIToolKit-Version TextMeshPro is integrated.
In Resources-Folders some Files are created. If you have the resource files which the old TextMeshPro System created are still present in your project, it causes build created with Unity 2020.2.1 to crash.
Probably because then there are two asset Files with the same name present.
After I deleted the old asset Files which are in both systems, builds worked again!

Unity 2020.1. did not have that problem.

1 Like

It seems like I have the same problem in my project when upgrading to 2020.2.1f1. I am using TextMeshPro (3.0.3) with UI Toolkit (preview 13) and when creating a built, it crashes on startup (with error “Size overflow in allocator.”). When I delete all the Resource Files from “Assets/TextMesh Pro/Resources” the build works again. However, this solution does not really work for me, because then all TextMeshPro texts components are broken.

Therefore, I tried to selectively delete files in the folder to find the culprit of this bug. At first, I thought “Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationsSans SDF.asset” was the culprit, since this was the only file I needed to delete to get the build working (the text was still broken, though). However, it seems to be more complicated than that:
In an attempt to get my text working again (while “LiberationsSans SDF.asset” is deleted), I set the “Default Font Asset” in “TMP Settings” to the fallback font. Upon doing so, the builds started to crash again.

Maybe these experiments help someone figure out the actual bug.
In the meantime, does anyone have a good solution to get both TextMeshPro text and UI Toolkit UI working in 2020.2.1f1?
Also, @manuelgoellnitz , did you have the same problems of the TextMeshPro text not working anymore after deleting the assets, or did I do something wrong?

Edit: This issue was fixen in my project as of Unity 2020.2.2f1

I didn’t look further into it but we don’t use the standard font anyway.

I can confirm that this is happening to me aswell.
Using 2020.2.2f1 and TextMeshPro 3.0.4, my builds crash on start. The crashing is solved as soon as I remove the text components from my buttons.

Edit: To clarify, I don’t use the new UI package. The crashing is resolved if I replace any TMP text components by regular text components.

What platform are you building?

Do you still get the crash with a simple scene with just a TMP Button in the scene? Just trying to figure out how to reproduce the issue.

Do you see the com.unity.textcore package installed in Package Manager?