Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

TextMesh Pro TMP and 2018.2

Discussion in 'Unity UI & TextMesh Pro' started by RealMTG, Jul 10, 2018.

  1. RealMTG

    RealMTG

    Joined:
    Jul 27, 2013
    Posts:
    200
    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:
    11
    Me too!
     
    RealMTG likes this.
  3. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,396
    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

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,396
    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:
    235
    I've also upgraded and am getting errors as well
     
  6. Muckel

    Muckel

    Joined:
    Mar 26, 2009
    Posts:
    421
    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.
     
    vanxining likes this.
  7. SoloChristian

    SoloChristian

    Joined:
    Oct 9, 2012
    Posts:
    500
    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:
    421
    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.
     
  9. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,396
    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
  10. RealMTG

    RealMTG

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

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,396
    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. RealMTG

    RealMTG

    Joined:
    Jul 27, 2013
    Posts:
    200
    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

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,396
    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. RealMTG

    RealMTG

    Joined:
    Jul 27, 2013
    Posts:
    200
    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

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,396
    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:
    3
    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

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,396
    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:
    3
    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:
    3
    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

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,396
    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

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,396
    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

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,396
    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:
    201
    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

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,396
    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:
    201
    (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

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,396
    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:
    201
    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

    Unity Technologies

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

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    201
    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:
    201
    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

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    1,396
    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.