Search Unity

TextMesh Pro TMP and 2018.2

Discussion in 'UGUI & TextMesh Pro' started by Hertzole, Jul 10, 2018.

  1. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    422
    Hello

    I'm trying to use TextMesh Pro 1.3.0 for 2018.2 and I just get a bunch of errors related to the example scripts not being able to find a bunch of TMP files. I've tried to remove the folder located in
    %appdata%/Local/Unity/cache/packages/staging-packages.unity.com/
    and re-download it but the error persists. I can, however, use the 1.3.0 preview version due to it not having any example scripts. Since I haven't seen any other posts about it, am I the only one experiencing this?
     
  2. Davide1104

    Davide1104

    Joined:
    Jun 12, 2013
    Posts:
    38
    Me too!
     
    Hertzole likes this.
  3. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Let me take a look.

    In the meantime, I would suggest using version 1.2.4 which is the most recent release.
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I just tried version 1.3.0 in Unity 2018.2 and didn't get any errors.

    I would recommend deleting the package cache to see if those errors persist. So delete the whole "%appdata%/Local/Unity/cache/..." folder. Unless you have modified the source code of some of the package, deleting the whole cache should be fine.
     
  5. QuantumCalzone

    QuantumCalzone

    Joined:
    Jan 9, 2010
    Posts:
    262
    I've also upgraded and am getting errors as well
     
  6. Muckel

    Muckel

    Joined:
    Mar 26, 2009
    Posts:
    471
    here too....
    deleting the cache folder doesn't work when restarting Unity 2018.2 !
    Just wondering if Unity makes some test with it's own assets???
    Every Update you get new problems...
    M.
     
    Star-Lab and vanxining like this.
  7. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    They added a copy to the packages folder now. And even worse it doesn't actually load everything until you use it for the first time. I am forced to rebuild every single interface in my products because of this. The errors are probably because you have 2 copies in your project now....
     
  8. Muckel

    Muckel

    Joined:
    Mar 26, 2009
    Posts:
    471
    hello,
    solution:
    Delete the old version of TMP in Asset folder...
    than reopen Project & go:
    Window -> TextMeshPro -> Import TMP essentials
    than
    Window -> TextMeshPro -> Project Files GUID Remapping Tool...
    this will update the project and fix all missing TMP scripts...

    hope this helps other too... ;-)
    M.
     
    sharkapps, sebonline1987 and sier_ua like this.
  9. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Unity 2018.2 already includes a version of the TMP UPM package. As such, if you have a previous version of the source code or dll-only version of TextMesh Pro, you end up with two versions of TextMesh Pro in the same project.

    In this case, you will have to upgrade to the new TextMesh Pro Unity Package Manager (UPM) version. Please see the following sticky post with detailed instructions.

    To summarize these steps
    (1) Backup your project

    (2) Close all open scenes.

    (3) Remove previous version of TextMesh Pro by deleting the "TextMesh Pro" folder. Be sure to review any changes you may have made to the TMP Settings or to any of the assets contained in the "TextMesh Pro" folder hierarchy.

    (4) Install the latest version of the TMP UPM package by going to "Window - Package Manager" and selecting version 1.2.4 (which is the latest).

    (5) Import the TMP Essential Resources as well as the TMP Examples and Extras (optional but recommended). See "Window - TextMeshPro - ..." menu.

    (6) Convert project files (related to TMP) to the new set of GUIDs and FileIDs used by the new TMP UPM package. This is done by using the "Project Files GUID Remapping Tool" also found in "Window - TextMeshPro - ..." menu.

    At this point everything should be working as expected. If you run into any issue, please let me know.

    Note about the conversion: For most users this scanning process is pretty quick but there have been cases where it took hours. I would like to make this faster, but I am still trying to get my hands on one of those projects. Everything I have tested thus far takes a few minutes to convert.

    The migration to the new TMP UPM package and conversion of the project to the new format can be a pain but once running on these new TMP UPM versions, subsequent upgrades are so much simpler via the package manager.
     
    Last edited: Jul 11, 2018
    travispettry, sier_ua and sean244 like this.
  10. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    422
    But this was a project that didn't have any prior TMP assets in it... And it was just downloaded from the package manager.
     
    renman3000 likes this.
  11. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    It is possible that you created the project using a Template as some of those templates do include a version of TMP.

    Also as per one of my previous posts, you can delete the specific TMP package(s) by going to "...\AppData\Local\Unity\cache" and then looking in the "npm" and "packages" sub folders to remove references to the TMP packages. However, there should not be anything in staging which if you had TMP stuff in there is pretty strange.

    Like I said before, I typically nuke the whole "cache" folder.
     
    Last edited: Jul 11, 2018
  12. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    422
    Yes, a template has imported it automatically, and when updating to 1.3.0 (from staging-packages.unity.com), the error persists. I tried updating to 1.3.0 in a newly created project and in a complete project. It was also the same deal with a project that was created sometime around 2017 but never had TMP until now.
    I also nuked the entire cache folder and when it downloaded the files again, the issue remained.
     
  13. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    You should only be updating packages via the "Package Manager" menu. Packages in staging are not production ready packages.

    The latest package for TextMesh Pro is 1.2.4. You can certainly check out the preview of 1.3.0 but do so via the Package Manager UI (as I mentioned before).

    Take a look at your project manifest file which is located at the root of the project in "Packages". See if this manifest references the staging registry (which it should not). Unless you are using some other package, I would suggest simply deleting the "Packages" folder and indirectly the project manifest. Then once again, delete the whole cache folder. Restart Unity after that. Open the package manager UI to check what version of TMP is installed. It should be 1.2.1 which you can then upgrade to 1.2.4.

    Let me know the outcome of all of this.
     
  14. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    422
    With "when updating to 1.3.0" I meant using the package manager. I apologize if that wasn't clear!

    And regarding the package version, I will stick with 1.2.4 or 1.3.0 preview. I guess the "staging-packages" tricked me into thinking there was a verified 1.3.0 version since there was "1.3.0 preview" and just 1.3.0. I'm also using staging-packages just to check out some new stuff, so I know why it's there. Also, in the newly created project, staging-packages was not present by default, so I could only go up to 1.3.0.
     
  15. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Production packages go through some verification process. Packages in staging do not so I think it is fine to poke around in staging land but you could end up with packages conflicting and all kinds of stuff.

    Also the project manifest can only point to one location. Either production packages are all staging packages. Again, for testing / experimenting with packages, grabbing stuff from staging is likely fine but I would stay way from that for real projects.

    Having said all of that, how are things running now when grabbing / upgrading the package from production / via the Package Manager UI?
     
    Last edited: Jul 11, 2018
  16. CR_Admin

    CR_Admin

    Joined:
    Sep 8, 2017
    Posts:
    4
    Hey all,

    Semi-related to this topic (possibly entirely related):

    When moving to 2018.2 and upgrading our TMP install via the instructions above, we're finding that TMP objects which spawn material instances (due to in-code changes to their material properties) just don't draw at all (appear invisible). An easy way to test is to change the render queue via script.

    Is this a known issue? Any way around this?

    Note: we're using lightweight render pipeline.

    Edit: I am not sure if this is limited to TMP or if any instanced material suffers from the same problem. I will test.

    Edit 2: Appears specific to TMP (used another standard material on a cube, changed render queue, still visible).
     
    Last edited: Jul 11, 2018
  17. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    This behavior is specific to using the LightWeight render pipeline. It is possible that the render pipeline is missing a callback similar to OnPreCull which is when the text objects get updated. Without this callback, text objects simply don't get updated.

    I'll provide more insight as soon as I have more information. Hopefully, we can provide you with code changes that you can make to the local package until this callback gets added (if missing).

    Update
    Just created a new project with the Lightweight RP Preview using Unity 2018.2.0f2 with version 1.2.4 of TMP and everything appears to be working correctly.

    Can you provide the steps to reproduce the behavior?
     
    Last edited: Jul 11, 2018
  18. CR_Admin

    CR_Admin

    Joined:
    Sep 8, 2017
    Posts:
    4
    I didn’t check a brand new lightweight project but will in the morning.

    The project the problem occurs in is a standard configuration project that we’re “upgrading” to lightweight for access to shader graph stuff (mobile platforms are primary target).

    The process I took was to install the lightweight pipeline, create a Lightweight Pipeline asset, and bind it under graphics settings. I then ran the material upgrade process (which actually broke every material in some very basic ways but we figured out how to resolve). Finally, I also deleted our manually added TMP install and added the new TMP package, then ran the GUID fixer.

    The end result was a situation where TMP material instances appear invisible while non-instances work fine.
     
  19. FerryvD

    FerryvD

    Joined:
    Sep 9, 2016
    Posts:
    25
    I updated our project to 2018.2 and updated TMP to 1.24 when i run the project everything seems to work just fine. but in Visual studio all TMP references are red and i can't debug the project because it gives errors when building.

    I already removed the cache files, reinstalled TMP, but nothing seems to work.
    It also appears to happen in a new project, i can't use any code related to TMP.
     
  20. CR_Admin

    CR_Admin

    Joined:
    Sep 8, 2017
    Posts:
    4
    Thanks for the reply, Stephan.

    It looks like the culprit was actually an out of bounds render queue (> 5000) on a core TMP object. Apparently this was allowed (in that no error occurred) in all previous versions of Unity but now causes a draw issue (which I'm fine with, as the range is 0 - 5000 per the docs).

    As a suggestion, it may be helpful to post a console warning when such a case is encountered? Now that the range appears to be enforced differently.

    Also, as a quick follow-up to the Lightweight Pipeline Material upgrade process. All transparency-enabled materials we had broke on upgrade. Problem one was that they just didn't appear at all. This was fixed by simply looking (no joke) at the material in the inspector at runtime, although it's possible runtime is not necessary. The second was that any transparency settings were lost - all materials were set to opaque. Part of me thinks that was actually an intentional decision made to force people to carefully consider what needs to be transparent, but I thought I'd mention it anyway :)
     
  21. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Glad you figured out the issue with those materials and good feedback.

    I would suggest posting this feedback in the Graphic Experimental Previews section of the forum.
     
  22. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Are you using Assembly Definitions for your scripts? If so, you need to edit the .asmdef file to add a reference to the TMP assemblies which are Unity.TextMeshPro and Unity.TextMeshPro.Editor.

    See the following post but make sure you use the assembly names above instead.

    If you are not using your own .asmdef then I would suggest deleting the library folder in the project and the visual studio solutions. Also make sure you are running the latest version of Visual Studio.

    Let me know if any of this resolves your issue?
     
  23. MineyMatt

    MineyMatt

    Joined:
    May 17, 2018
    Posts:
    1
    The tool doesnt work if you use Collab. your meta data files are forced hidden and the tools says you have to expose them...is there a solution for this?
     
  24. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I used Collaborate and you can temporarily disable Collaborate to switch to visible meta and even re-enable Collaborate before scanning or converting and (in my case) Collaborate doesn't change the meta back to hidden.
     
  25. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    My project is fairly large. Started the scan this morning and 6 hours later I'm only at 10829/67585. At this rate the scan is going to take ~36hrs =/
     
  26. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I fell horrible about the amount of time this process takes. I really want to figure out how to speed this up but I need access to one of those projects that takes stupid long to convert so I can look at them.

    Any chance you can provide me access to the project? If you can, make sure you provide me with some private link or something via PM, Email or via Unity bug reporter.
     
  27. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    (I am on a mac if that makes any difference)
    Let me see what I can do about zipping it up and throwing it up somewhere. Do you need the Library? Or would you rather do the ~6hr crunch import? =O
     
  28. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The project itself would be best compressed in whatever format is convenient for you.

    I don't mind having to go through any length of import time. I really want to figure out a way to reduce this conversion time for everyone.
     
  29. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    Ok I'll zip up the project excluding the library folder (to save time and space) and stick it up somewhere this weekend for you. Thanks in advance for looking into it!
     
  30. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Thank you for taking the time to do this. I greatly appreciate :)
     
  31. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    One low hanging fruit I thought of that could speed the process up is to give us an option to specify which folders to scan. I know exactly which folders contain TMP resources so it would be nice if I could tell the scanner to only concern itself with those instead of the entire project.
     
    Stephan_B likes this.
  32. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    I should also mention that the scan finished in just under 12 hours. The unfortunate part however, is that many of my prefabs did not get properly converted and since the scripts do not exist in the project I can't just drag and replace the script in debug mode =/ . Any tips on that one?
     
  33. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Do you ever recall manually re-assigning those scripts to objects in the past? If so, they likely were reconnect to the runtime dll instead of the editor. To address that I have replacement GUID conversion set which is available in this post.

    Unfortunately, this will require a re-scan so if you can provide me with the project, I should be able to figure out why it is taking so long and make this process much quicker for others going forward.
     
  34. ndever

    ndever

    Joined:
    Apr 22, 2017
    Posts:
    15
    Hi,

    So if anyone has the issue where there are no GUID converter and other options at Window/TextMeshPro. What worked for me is to not skip the second step from above: closing all scenes :) This can done by opening up a new scene. Happy converting and let's hope things will get easier by the new Package Manager!

    ndever
     
    Last edited: Jul 28, 2018
  35. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Once on the new package manager versions, the upgrade process gets so much easier.
     
  36. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    Hi @Stephan_B
    I am sorry if the solution is in this thread, but I do not see one applicable here.

    After updating a project (from 2018.1 to 2018.2), I am getting these long list of errors pertaining to TMPro. There are 19, all pertain to Color32.



    That said, I have no TMP asset in my Assets folder, only in the Packages Folder.
    ?? Help!

     
  37. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    These errors indicate there is another version of TMP in the project. If the project was created using a template, some of those templates include TMP.

    Unity 2018.2 includes the TMP UPM package version 1.2.4 by default. As a result if the project already includes a previous (non package version of TMP) you will get those errors. You will need to remove the old / previous of TMP from the project. See the following thread and Updates Notes at the bottom of the first post.
     
  38. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697

    Thanks, I had seen that mentioned, but I can not see TMPro in any folder but the Packages. Will continue search.
     
  39. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    @Stephan_B Thanks!
    Yes, its was nested "tmpro_plugin", in my own Art/Fonts folder.
    Thank you.
     
    Stephan_B likes this.
  40. unity_LzBuY34i8W2htg

    unity_LzBuY34i8W2htg

    Joined:
    Dec 27, 2017
    Posts:
    9
  41. PhoenixAdvanced

    PhoenixAdvanced

    Joined:
    Sep 30, 2016
    Posts:
    316
    I have just ported my project from 2018.1 to 2018.2. I am using TMP extensively.

    I can confirm that the standard upgrade path and GUID remapper does work, however all of the font settings (size, colour, etc) will be reset, which is a nuisance.

    Also, the GUID remapper does take a long time. I found that the vast majority of the changes that need to be made were in my scenes directory, so pointing the remapper at that directory only (using the modifed script posted here) saved a LOT of time.

    Just some advice that might help other people.
     
  42. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    None of the settings should have been affected. Can you provide more insight on this? Were those normal objects or prefabs or just font assets?
     
  43. PhoenixAdvanced

    PhoenixAdvanced

    Joined:
    Sep 30, 2016
    Posts:
    316
    I was using TMP fairly heavily. I had prefab objects using TMP (basically in-game computers that the player could access) and I had simple text in a world space UI to act as a HUD for the player and for vehicles.

    I need to change the font size and colour, and a few of the variable links in the editor were broken (missing scripts, etc).

    It wasn't too painful, thankfully, it may have been due to the complexity of my project?
     
  44. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I think those remaining missing references were likely due to these script references having been re-assigned in the past but instead of using the Editor DLL that were switched to reference the Runtime DLL.

    Just in case anyone runs into this, I did post an alternative set of package conversion files which are described in item #6 in the Update Notes at the bottom of the sticky post here. Here is a link to the post that contains the revised set.
     
  45. PhoenixAdvanced

    PhoenixAdvanced

    Joined:
    Sep 30, 2016
    Posts:
    316
    Thank you, I'll bear that in mind in the future.

    The other thing is that I didn't close my scene before porting to 2018.2, which the instructions say to do, so that might be part of the issue.
     
  46. pintianz

    pintianz

    Joined:
    Mar 1, 2015
    Posts:
    25
    TMP remapping tool did not work for me. I upgraded from 5.5.4 to 2018.2.9.
    - I saved the original project and close all the scene before I switch to Unity 2018.
    - Deleted old TextMesh Pro folder in 2018, reloaded unity, then imported essential assets from the windows dropdown menu
    - Scanned with the remapping tool but only 1 out of many scenes were detected. I clicked save on the remapping tool then opened the supposedly detected scene and all of my component references to Textmesh pro turn out missing.

    Did I do anything wrong in the process? I thought the remapping tool is supposed to fix the missing references.
     
  47. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Download the updated tool which will allow you to select specific folders to scan. This can speed up the process for large projects is it allows you to specifically target folders that you know contain TMP related stuff and to exclude those you know do not.

    Also use the alternative conversion data file which are necessary in case at some point you manually re-assigned some of the TMP scripts and ended up picking the Runtime DLL instead of the Editor DLL.

    Links to these are my previous post above.