Migrating from Legacy / Asset Store to Package Manager Releases

You can remove them by deleting the TextContainer component from those prefabs Or create some editor script to do it.

Right now I would wait until the RectTranform / Prefab apply issue is resolved.

I got it working for the time being (I’m not really trying to get any work done with 2018 atm, so I can be messier than usual). I just had to disable collaborate so I could change that visible meta option.

And then it took for the tool 2-3 hours to find everything. My project is not small, but it’s not that big either. It’s fine either way, it worked fine in the end, I was just expecting the process to be quick, so I kept fighting the feeling that something really wrong was going on. But it worked in the end.

Any chance you could submit a Bug Report or provide me with a Repro of that project so I can take a look at why it is taking that long?

For anyone who’s interested I used this tool to find all the TextContainers in my project and removed them.

https://discussions.unity.com/t/541667

1 Like

I don’t think I can share the whole project.

I’ll try to create a minimal retro in the next couple of days, but I think it may have something to do with my machine too. I’ll see if I can try on a different machine as well, but no promises.

Will the new TMP make the task of creating crisp text with small font sizes (9-12 point) easier or improve their rendering quality?

At the moment I have not been able to find any way to display small fonts in a clear manner as the text always looks either blurry or inconsistent in size.

For point sizes like 9 to 12, using a bitmap font asset with hinted smooth is as good as you can get. You can still get good results using SDF with certain fonts but in the end that is not a lot of pixels to work with.

Keep in mind that given most devices now have retina / higher resolution / pixel density, the need to render at those small sizes is going away. For instance, Apple’s new San Francisco font no longer uses hinting as hinting was mostly only beneficial at small point sizes which at higher pixel density / resolution like retina displays is no longer really necessary. The key issue with hinting and small point sizes was essentially making all fonts pretty much look the same (again due to limited number of pixels to work with). As resolution increases, to maintain the same physical size, we will be sampling that 9 point at 36 points where the shape and visual appearance of the font will be better maintained using anti-aliasing and SDF will once again be great for those perceived small point sizes.

P.S. Keep in mind that some fonts look better than other at small sizes. Apple’s new font is an example of this. So pick you font carefully for those small sizes as some of them can still look good at 9 point using SDF.

1 Like

At least “pixel-fonts” can be rendered perfectly crisp.
You need a relatively high distance in your SDF font (8 or higher). And then you increase the scaleX and scaleY in the debug settings of the SDF shader.

Even selecting those intended values like “Raster Hinted”, will only give bad results in many situations.
A normal SDF with scale increased will give you pixel perfect fonts + the ability to set outlines and shadows.

However I have not found a good way to get good rendering with very small fonts.
Or maybe that’s just because I’m so used to clear-type rendering?

edit:
Just saw Stephans post above. Higher pixel density is definitely an advantage as TMP (the SDF technique) becomes unbeatable in quality as the font size increases.

Stehan_B I am wondering if you would / could include rsp files in the essentials to define a compiler symbol so in case people wanting to provide assets they would get the option to support Text and TextMeshPro (if the essentials are existing in the project)

The latest release of TMP should include the “TMP_PRESENT” define.

2 Likes

When we try to debug in 2018.1b5 with the new TMP from PackageManager and VS for Mac.

Build FAILED.

CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_UpdateManager.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_UpdateRegistery.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_XmlTagStack.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMPro_EventManager.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMPro_ExtensionMethods.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMPro_MeshUtilities.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_SpriteAsset.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMPro_Private.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_DefaultControls.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TextMeshProUGUI.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_SubMeshUI.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMPro_FontUtilities.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_LineInfo.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMPro_ShaderUtilities.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_SpriteAssetImportFormats.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_Dropdown.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_Asset.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMPro_UGUI_Private.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_ListPool.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/MaterialReferenceManager.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_Style.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_Text.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/PackageResourceImporterWindow.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TextContainer.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_TextElement.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_FontAsset.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_StyleSheet.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_ColorGradient.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_ScrollbarEventHandler.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_MaterialManager.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TextMeshPro.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_Compatibility.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_SelectionCaret.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_MeshInfo.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_InputField.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_SubMesh.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_TextInfo.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_CoroutineTween.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_Sprite.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/FastAction.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_Settings.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_ObjectPool.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_SpriteAnimator.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_InputValidator.cs’ could not be found.
CSC : error CS2001: Source file ‘/Volumes/OSX/Projects/Unity/Musicuso/Packages/com.unity.textmeshpro/Scripts/Runtime/TMP_TextUtilities.cs’ could not be found.
0 Warning(s)
45 Error(s)

Does this happen consistently? Was this happening with beta 4?

I am traveling today but will look into it over the weekend or on my flight if I can.

I just installed TextMesh Pro 1.1.0 using the Package Manager in 2018.1.0b6 and noticed it can’t be referenced by my custom assemblies in the project.

To make it work, I manually edited my asmdef files to add references to “com.unity.textmeshpro.Editor” and/or “com.unity.textmeshpro.Runtime”

It seemed to work and the project compiles.
Is this the correct way to approach this? I imagine the package manager, when further fleshed out, will offer to add the references, or at least inform the user of their existence.

I followed the guide without too many troubles until step 6. The problem the is that Version Control Mode is not available in Collaborate mode, therefore, the GUID remapping tool is not able to do its job. Any ideas on how to overcome this limitation?

I need to look into this part…

Update
To get around this behavior, you can temporarily disable Collaborate which will allow you to go change the Editor Settings in the menu “Edit - Project Settings - Editor - Version Control Mode to Visible Meta Files”. As soon as this is done, re-enable Collaborate and then re-scan the project for conversion.

Collaborate will then track the changed files including the modifications to the EditorSettings.asset.

As usual, please be sure to back up your project before doing any of this.

1 Like

Thanks, I’ll try this as soon as I am able and will let you know.

1 Like

Looking for recommendations for avoiding a big performance issue with TMP.

Why does the OnEnable of TextMeshPro call SetVerticesDirty ? This causes the object be queued for a graphics rebuild, which in some cases we’re using is very expensive. It seems completely unnecessary to rebuild the graphics when in essence one just wants to show/hide it using the unity standard ways of doing so.

I also tried turning off the sub meshes(via SetActiveSubMeshes and renderer.enabled), but that appears to be unreliable, because I think something within the precompiled assembly is turning it back on again.

It seems reasonable to expect a mesh not to be rebuilt simply by enabling/disabling the component.

Think I’ve found a suitable workaround by making SetMeshFilters public

Enabling and disabling objects can actually be pretty expensive depending on how many are being enabled and disabled and especially so with the Canvas system if using Layout components as disabling or enabling a single object can affect many.

Depending on what you are trying to achieve and if you are using the normal TextMeshPro component with the MeshRenderer, disabling the MeshRenderer has always been much cheaper than disabling / re-enabling the object itself.

At some point, the Reference object picker in the Assembly Definition Inspector will allow you to see and pick package assemblies like those of TMP. Until then, as you have done, users will need to manually edit their .asmdef to add references to the package assemblies they want to reference.