As per the title and assuming all goes well, a new version of TextMesh Pro will be included by default in Unity 2018.1. Most likely starting with Beta 2 or Beta 3. (See Updated Notes below about 2018.2 and additional information )
This new version of TMP will be made available via the new Unity Package Manager (also part of Unity 2018.1). These new Unity Package Manager (UPM) packages are shared between all projects. This new version of TMP includes source code and uses the new Assembly Definition feature introduced in Unity 2017.3.
Due to how this package manager works, it is important to understand this new version of TextMesh Pro will be using a completely different / unique set of GUIDs and FileIDs which was necessary to make sure it did not conflict with the current sets of GUIDs and FileIDs used by the source code and DLL only versions of TMP currently out there. As such project files and assets created with previous versions of TMP will require the use of a utility to convert these existing projects to use the new sets of GUIDs and FileIDs.
During the beta period for 2018.1, I would love to get your feedback and most importantly assistance to test this project conversion utility to make sure it correctly handles the conversion process.
My suggested upgrade steps are as follows but expect these may change based on your feedback.
-
Before installing Unity 2018.1 or newer, open your project in your current version of Unity and close all scenes you might have opened. Using “File → New Scene” will close current scenes. In this step we are trying to avoid having any TMP resources or DLLs loaded when you first open Unity 2018.1 or newer. Failing to do so will just confuse the crap out of Unity and make the upgrade process more complex.
-
Due to an important change in Unity 2018.3 related to Prefabs, you must switch Asset Serialization mode to Force Text in your current version of Unity prior to opening the project in Unity 2018.3 or newer releases of Unity.
-
Since the latest releases of the TMP package for Unity 2018.3 or newer require .Net 4.x, you should also change this in the Project Settings - Player - Other Settings.
-
As usual, please backup your project before upgrading to this new version of TMP and Unity 2018.1 or newer.
-
Install Unity 2018.1 or newer. Personally, I always install new major versions of Unity in separate folders which allows me to use multiple versions of Unity for testing and what not.
-
Open the latest release of Unity and expect to see lots of error messages since the older version and new versions of TMP are present thus resulting in class conflicts. This could be avoided by deleting the “TextMesh Pro” folder in step (1) but it isn’t necessary as once the previous / older version of TMP is removed by deleting the “TextMesh Pro” folder these errors will go away. That is provided you did close any open scene using TMP in step (1). Once the “TextMesh Pro” folder is deleted, Unity will go through an Assembly Reload and the new version of TMP will finally be loaded.
Note that I could have used a new namespace for this new version but this would have required updating all the scripts referencing the “TMPro” namespace which given these errors only show up during this upgrade process, going thru all the scripts to change the namespace would have been more complicated in my opinion.
- Now we need to import the Essential Resources that TextMesh Pro needs. These are the default font asset, sprite asset, stylesheet, shaders, etc. You can add these to your project by going to the “Window - TextMeshPro - Import TMP Essential Resources” menu. These resources will be added to your project in the “TextMesh Pro” folder.
Note: These resources could have been contained inside the new TMP UPM package but these would have be hidden and given they would be inside a Resources folder to make it possible to access them at runtime, they would have been part of any build whether or not TMP is used. As such I thought it would be better to make those visible to users by adding them into the local project and giving you control over them.
- Lastly, since this new version of TMP uses a new set of GUIDs and FileIDs, we will need to convert your existing project files and resources to use this new set. To convert the project, go to “Window - TextMeshPro - Project Files GUID Remapping Tool”. This will open the new Project GUID Remapping Tool which will enable you to Scan the Project to find the resources and files than need to be converted and then if you chose convert them to the new set of GUIDs and FileIDs used by this new version of TMP. Please be sure to following the instruction provided in the tool and to have made a backup of your project first.
Please provide feedback on this process and most importantly let me know if you run into any unforeseen issues. I have run through this process many times with various projects and it worked fine. On the other hand, “Murphy’s Law” is always in full force so provided you backed up your project first, we’ll be able to iron out whatever issues and make sure we get all these projects converted over nicely.
If you have any questions, suggestions, again please feel free to ask away.
Update Notes
- Unity 2018.2 - The TMP UPM package is now included by default with Unity 2018.2. As such, if your project includes a previous version of the source code or dll version of TMP, you will be getting a lot of errors as a result of having two versions of the product in your project.
These errors are temporary and will go away once you remove the previous version of TMP and complete the upgrade / migration procedure outlined above.
- The TMP UPM package (like all other packages) uses the new Assembly Definition feature (.asmdef) where the TMP scripts are compiled in their own assembly. There are two assemblies: Unity.TextMeshPro and Unity.TextMeshPro.Editor.
If your scripts also use assembly definitions, you will need to manually edit your .asmdef files to add a reference to the appropriate TMP assembly. See the following[ post]( Migrating from Legacy / Asset Store to Package Manager Releases page-4#post-3528465).
-
The Test Runner also automatically creates and uses assembly definitions when it create a test folder. The .asmdef created and contained in this test folder also need to be manually edited to add a reference to the appropriate TMP assembly. See the same post as above.
-
There appears to be issues related to project solution where the TMPro namespace or some of the scripts / class of TextMesh Pro might not be recognized in Visual Studio. If that is the case, upgrading to the latest release of Visual Studio 2017 which is currently 15.7.5 appears to resolve this issue.
Similar issues can also happen with other code editors. In all cases, please update those editors to the latest / most recent versions and it should resolve these issues.
- The scanning process to identify which project files need to be modified to reference the new GUIDs and FileIDs used by the TMP package can be very slow. As such, I have modified the tool to allow specifying a target folder to scan. This way, you can target only the folders that you know contain TMP related stuff / references. Depending on the structure of your project, this can greatly speed up the conversion process.
Please note the project files can be converted progressively. So even if you forgot some files / folders, you can always re-run the conversion tool to target these addition files / folders.
Also note the scanning process does not modify any of the files. The modification only happens on the next step.
This improved Project Files GUID Remapping tool will be included in version 1.2.5. Until version 1.2.5 is released, I have attached the modified code file for the scanning tool, which you can download and replace from the package cache.
-
Some users may have manually re-assigned script referenced in the past. In some cases, the incorrect dll / script was re-assigned. So if it appears that some of the files that you suspect contain TMP related stuff are not getting converted which you think you might have manually re-assigned in the past, then download the replacement GUID conversion file found in [this post]( Migrating from Legacy / Asset Store to Package Manager Releases page-4#post-3535339).
-
Uncovered potential issue with Prefabs where even though a project serialization mode may be set to Force Text in the Project Settings - Editor - Asset Serialization, the prefabs might have remained serialized in Binary which would result in the GUID Remapping Tool ignoring these prefabs since they are still in binary format.
In order to make sure prefabs are handled correctly, you can open the backup of your project in the previous version of Unity (prior to undergoing the upgrade process) and switching serialization mode back to Mixed Mode and then back to Force Text which would force these prefabs to get re-serialized as text. To make sure the re-serialization worked correctly, you can open in some text editor the prefab file to see if it is indeed in text format. Once it appear the prefabs and other assets are all in Force Text mode, the process with the upgrade process as per the instruction above.