This is related to Glyph Adjustment Pairs (Kerning Pairs).
Can you provide me with the backup of the Font Asset that is producing these errors? Make sure it is the version of the asset prior to upgrading to 2019.x.
In version 1.4.1 and 2.0.1, I did make a change to avoid this issue. However in your case, the font asset’s Glyph Adjustment Table was already converted in version 1.4.0 or 2.0.0 which is why you are getting this issue.
Depending on how many font assets you have, I would suggest taking the older version of the font asset (like you just provided me) and replacing the already converted ones by the older ones. This will re-convert them in 2.0.1 where everything will work as expected.
I will also make additional changes to try to handle this more gracefully for users who end up in the same situation.
Let me know if reverting / re-importing the older versions is a workable solution for you and if that worked as expected.
You will get a console message when these are converted again.
I do have the exact same error message except I created the project in unity 2019 and never converted. I do not quite understand, what you mean by reverting / re-importing. Thx for help in advance
I have the same issue when changing a font to one with Cyrillic characters during runtime. Unity 2019.2.17f1. The font has been created using this version. Are you suggesting I download an older version of Unity just to create a font that actually works? If so which version would you recommend?
If you are using the latest version which is 2.1.0-preview.4 for Unity 2019.x, please provide me with a simple reproduction project / scene so I can figure out what this behavior is still occurring.
I am getting ready to release preview 5 and could actually address that quickly before.
If you can reproduce these steps easily in the latest release, them please provide those instead if that is easier for you.Otherwise, you can submit a bug report with the included project and steps and once you get the case # back from Unity via email, please provide that case # to me.
I made a sample project and got the same error. However I noticed that my TMP seems to be out of date. I’m not sure why as I have downloaded Unity 2019.2.17f1 recently.
When I added a TMP object, I was given the option to import the various TMP stuff. Under Assets I have ‘TextMesh Pro’ folder with fonts, documentation etc. The documentation is dated 2016.
Under Packages I have ‘TextMesh Pro’ witht he ChangeLog showing the latest version as 2.0.1
I have tried reimporting both folders but the errors persist.
If the problem is an out of date TMP could you let me know how to update it?
I was able to observe the issue in the repro project you provided. This issue was resolved in one of the preview release of version 2.1.0 of the TMP package which are currently available via the package manager.
Please install version 2.1.0-preview.4 of the TMP package. You might need to enable the “Show preview packages” in the Advanced tab of the package manager window.
P.S. Preview 5 should be available this week / within the next few days.
What about the 2018 users and any workaround about this error
Feels like there’s an easy fix, it has to be something with the dictionary registering them.
it happens randomly when instantiating it parented to an object.
EDIT:
mostly happens when you use custom font tags <font=“myfont”>
@Stephan_B The bug was reported back in February and TMP is up to preview.12 now. Why hasn’t this been pushed to a non-preview version? I tried both preview.5 and preview.12 and now I get this:
NullReferenceException: Object reference not set to an instance of an object
TMPro.TMP_SubMesh.OnDestroy () (at Library/PackageCache/com.unity.textmeshpro@2.1.0-preview.5/Scripts/Runtime/TMP_SubMesh.cs:295)
This will be addressed in Preview 13 and is related to a workflow that involves enabling / disabling Canvases.See the following thread which includes a solution for that issue until Preview 13 is available which should be over the weekend.
It is still in Preview since some issues are still being reported although very few now so I am hopeful Preview 13 might be the last one.