After update, TextMeshPro components no longer available

I just did … I’ll take a look at the project this afternoon and provide feedback as soon as I have more information / solution for you.

I should be able to resolve this today. I will most certainly keep you posted.

Thanks!

-Steve

Just letting you know that I was able to download / open the project and able to reproduce the issue.

The issue is related to the use of the text overflow mode ScrollRect which I wasn’t sure was still used by anyone. So that answers that…

In the latest release, there is no specific implementation for this ScrollRect overflow mode which ends up causing an infinite loop due which I am trying to reproduce in a simpler case to be able to provide some code changes that could be done easily and not require having to wait for a new release.

Back to the use of this Overflow mode, can you provide more insight on your use of this mode?

I probably don’t need it at this point, that was probably from several years ago when I was much less versed in how to use Unity. Are you saying that if I remove/adjust to ellipses or something different, all of the overflow ScrollRect elements, it will work with 1.5.0?

Yes and since you were not using that mode for any specific reason, it might be a good idea to revisit what Overflow modes you have set on those text objects.

Alternatively, you can make the following changes to the source code in the Global Package Cache which won’t require you make any changes to the project.

5032949--493340--upload_2019-10-4_23-8-29.png

I will be re-evaluating this Overflow ScrollRect mode to see if it still has any reason to be.

Thanks Stephan! I fixed the ScrollRect mode and everything worked fine. I did get this error however on entering a character name and using Input Field - it worked, but it threw this error. Just FYI:

NullReferenceException: Object reference not set to an instance of an object
TMPro.TMP_InputField.OnEnable () (at Library/PackageCache/com.unity.textmeshpro@1.5.0-preview.1/Scripts/Runtime/TMP_InputField.cs:1022)

Since I have your project already, can you provide me with the steps to reproduce the above error?

Sure. When you go to step 3 of setting up a new game - naming your House - when you click on the text entry field to name your House the cursor gets huge (double the size of the box) and at that point the error is thrown. Again, it works, but thought you’d want to know.

-Steve

One more question: What are the best settings for creating a font? I have been using auto point size, padding 5, 2048 X 2048 atlas size, Distance Field 32, and the rendered fonts still look terrible. What other settings have a positive impact?

The same settings on the prior version look fine, but I can’t seem to make a font look good (non-pixelated) in Unity on 1.5. They look great on the atlas, but they don’t look at all good in the actual editor or game.

Can you provide a screenshot of how the font looked before vs. now?

Also where can I observe that in the project you already provided?

In terms of generation settings, you should typically aim for a Sampling Point Size of 72 or above with padding of 10%. By default I normally use 90 Sampling Point Size with padding of 9. The atlas size is a function of the number of glyphs you need to fit in there. Most of the time, you want the atlas to be a maximum of 2048 x 2048.

Ah. Well, my point size is like 320 - is that too high? That’s probably why - the padding is way too low for the point size. I’ll try to adjust that. Thanks!

OK, that fixed it. Guess I didn’t understand the relationship between padding and point size - thought 5 - 10 would always work. Thanks!

Sampling point size between 72 to 120 works well for most Latin based glyphs. Rendering quality at lower sampling point size really depends on the specific font visual design. Interestingly, Asian based glyphs still render nicely with sampling point size as low at 32 to 36.

By default the Dynamic SDF mode uses 90 with padding of 9 for 10% ratio which is good for everything.

Unless your target output is something like a PDF document, a sampling point size of 320 is excessive. Good news is that you will be able to reduce your texture atlas size down to 1024 x 1024.

I would suggest updating your font assets to use a more reasonable sampling point size and padding. Make sure that all your fallbacks use the same ratio of sampling point size to padding. Keeping this ratio the same ensures visual consistency in regards to outline thickness, etc. So if the primary is using a sampling point size of 90 with padding of 9. The fallbacks could be using a sampling point size of 60 with padding of 6 for the same 10% ratio.

Back to the previous topic, be sure to check if the issue could be the result of using a Canvas Scaler which can affect text rendering. It should not be potential bugs can always creep in.

Hate to necro this thread - just updated this project up to 2019.3.15f1. Everything is great except for the same issue I had last time with everything being out of whack alignment-wise. There is no longer a 1.5.1 for me to go to that fixed the issue, is there some other way to get my original alignments back ? There are now over 2,000 TMPro objects and fixing them by hand is not a realistic option as far as time. I have tried to use 2.0.0, 2.0.1, and 1.4.1. Nothing gets the alignment back.

Thanks!

-Steve

The latest release is 2.1.0-preview.13 which should handle the alignment correctly.

Actually, I found that I could view the preview builds (they were set to hide for some reason when I upgraded the editor) and I just went back to 1.5.1 preview 1 and it worked fine. Is there any reason I should use 2.1.0 preview 13 otherwise? Thanks for the reply!

-Steve

Some of the Unity API has changed between 2018.4 and 2019.x where as such you should be using version 2.1.0-preview.x which is for Unity 2019.x.

In terms of the preview, I would recommend using Preview 13 as this is the most recent release to make sure everything works as expected there since the next release Preview 14 is likely to become the verified release.