Search Unity

TextMesh Pro Migrating from Legacy / Asset Store to Package Manager Releases

Discussion in 'UGUI & TextMesh Pro' started by Stephan_B, Jan 9, 2018.

  1. ishaan_gupta10

    ishaan_gupta10

    Joined:
    Sep 21, 2018
    Posts:
    13
    hey stephen_B

    i updated my unity few days back and now i am getting cs2001 errors .

    Severity Code Description Project File Line Suppression State
    Error CS2001 Source file 'C:\Users\Ishaan Gupta\Documents\New Unity project\Packages\com.unity.textmeshpro\Scripts\Runtime\FastAction.cs' could not be found.
    so many like this.
    what should i do. i am confused and i dont know much . can someone pls tell me in easy language how to get rid of it and compile my code
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    What version of Unity were you using prior to the upgrade?

    What version of Unity did you upgrade to?

    Did your project previously include TextMesh Pro?

    Is this the only error that you are getting?
     
  3. ishaan_gupta10

    ishaan_gupta10

    Joined:
    Sep 21, 2018
    Posts:
    13

    i dont remeber the prev version. now i have the latest version i.e.,2.8f1.... i dont know if it had TMP or not. i generally use vuforia so i dont know much in depth about unity.. around 138 errors out of which most of them are about missing xyz.cs and other were like missing dll file etc
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    What version of Unity are you using? 2.8f1 could mean Unity 2018.1 or 2018.2 Go to Help menu - About Unity.

    Did you back up your project before upgrading to the new version of Unity?

    Do you recall deleting the "TextMesh Pro" folder?

    Search in the Project tab for "TextMesh Pro" to see if anything shows up. If a "TextMesh Pro" folder is revealed then you will need to follow the upgrade procedure outline in the first post.

    I'll wait for your reply and go from there.
     
  5. ishaan_gupta10

    ishaan_gupta10

    Joined:
    Sep 21, 2018
    Posts:
    13
    im re installing unity.. ill get back to you in 15-20 mins . im getting the error even when im creating a new project.. No i dont remember deleting TMP folder. by project you mean individual projects right?? or is there a project name folder inside the main/root files of unity ??
    P.S> please dont mind. i a complete beginer in unity. i dont know much . i just use it for vufurio augmented reality
     
  6. ishaan_gupta10

    ishaan_gupta10

    Joined:
    Sep 21, 2018
    Posts:
    13
    ok so my unity vrsn is 2018.2.8f1 personal .. i created a new project.... i searched the project folder. there is no tmp named folder... in package also there is one file named manifest something only till now
     
  7. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    By Project, I mean the project tab as seen below:

    upload_2018-9-21_13-28-48.png
     
  8. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The search I was describing is as per the image I posted above.

    If you created a new project, the TextMesh Pro package should already be included and you should not be getting any errors.

    You should also be able to see the options to import the TMP Essentials and TMP Examples and Extras in the "Window - TextMesh Pro - ..." menu. So please import both of these by using the options shown in the image below.

    upload_2018-9-21_13-31-29.png
     
  9. ishaan_gupta10

    ishaan_gupta10

    Joined:
    Sep 21, 2018
    Posts:
    13
    yeah.. so when i tried to create a script and opened the visual studio.. 3 folders got created in the package folder of the project. one of them is com.unity.textmeshpro . inside it has a sub folder named scripts. inside scripts 2 more subs named runtime and editor which are both empty.. I got 45 errors saying missing xyz.cs file
     
  10. ishaan_gupta10

    ishaan_gupta10

    Joined:
    Sep 21, 2018
    Posts:
    13
    No folder of this name is here. wait im importing the resources and extras wait gimme a min
     
  11. ishaan_gupta10

    ishaan_gupta10

    Joined:
    Sep 21, 2018
    Posts:
    13
    yeah now there is a folder and 4-5 other things
     
  12. ishaan_gupta10

    ishaan_gupta10

    Joined:
    Sep 21, 2018
    Posts:
    13
  13. ishaan_gupta10

    ishaan_gupta10

    Joined:
    Sep 21, 2018
    Posts:
    13
    i tried cleaning the solution and rebuilding the script. still the errors are there :(
     
  14. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    When you open Visual Studio, the project solution is created automatically by Unity.

    You should be seeing "Unity.TextMeshPro" and "Unity.TextMeshPro.Editor" but it should not be "com.unity.textmeshpro". Again this is in Visual Studio.

    If you are seeing this, check what version of the TextMesh Pro package is installed. Go to "Window - Package Manager" menu. You should be seeing something like this.

    upload_2018-9-21_13-43-43.png
     
  15. ishaan_gupta10

    ishaan_gupta10

    Joined:
    Sep 21, 2018
    Posts:
    13
    same vrsn 1.2.4 is installed...!!!

    here are some errors Capthtfure.JPG
     
  16. ishaan_gupta10

    ishaan_gupta10

    Joined:
    Sep 21, 2018
    Posts:
    13
  17. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Please update to the latest version of Visual Studio 2017 which should be 15.8.5.

    Also if you have not already done so, please create a new empty project to see if you still get these errors. But only do that after updating Visual Studio to the latest release.
     
    ishaan_gupta10 likes this.
  18. ishaan_gupta10

    ishaan_gupta10

    Joined:
    Sep 21, 2018
    Posts:
    13
    ok wait ill update it and get back to you if problem still occurs. thanks for your help so far. you are really good and helpful :) . thanks a ton. but maybe ill return haha
     
  19. ishaan_gupta10

    ishaan_gupta10

    Joined:
    Sep 21, 2018
    Posts:
    13
    finally man . it worked. thanks a ton man. you are god
     
  20. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Glad everything is working and it was my pleasure to help out :)
     
  21. chrixxxtopher

    chrixxxtopher

    Joined:
    Apr 8, 2018
    Posts:
    6
    Just opened my project today and all instances of TMP have switched their color to black. Any idea why this happened to me?
     
  22. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Did you upgrade to a new version of Unity or updated something else?

    Is it the vertex colors or the face color that has changed?
     
  23. FlaxenFlash

    FlaxenFlash

    Joined:
    Oct 15, 2015
    Posts:
    28
    Is there any chance of another solution to this issue of Visual Studio not being able to find the text mesh pro namespace? I really don't want to update to Visual Studio 2017. My resharper license only covers 2013 and 2015 so updating would end up costing me hundreds.
     
  24. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    This issue is project solution / VSTU related so I am not sure if there is another solution.

    I would suggest making a backup of the project. Then using the backup version, delete the Library folder and all visual studio related files from the project. This did not work in the past but who knows.
     
  25. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Hi @Stephan_B !! I am starting to use TMPro and I have a question.

    I have an object "Text Mesh Pro UGUI" and in this I put as text sprites of an asset sprite.
    I have realized that this generates a child of this gameObject that contains a component "TMP_Sub Mesh UI" and as many materials as sprites you have put in the Text.

    How can I change by script change the alpha of the "Tint" parameter of the "TextMeshPro / Sprite" Shader so that the text sprites appear and disappear gradually?

    How each sprite that is put in a text, it seems that it has its independent material, Can somehow remove the alpha to a sprite without affecting the others when they all share the same atlas?

    I have been trying several ways but without result ... Could you help me please?

    a greeting
     
  26. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The main text object and sub objects combine together to make the visible text object. As a user, you don't really have to pay attention to any of these sub objects but know that for each material used as a result of using the <font> tag or <material> or <sprite> or fallbacks, you will get a sub text object for each.

    Just like an atlas texture can contain lots of characters which all end up using / sharing the same material, the same is true for sprite assets. So if a text object contains 20 sprites which are all contained in the same Sprite Asset / Texture then only one sub object is needed for all of them.

    Like I stated above, if the sprites are contained in the same Sprite Asset, they will only require one sub object for all of them. One sub object per material.

    There are different ways to control alpha of a sprite. The <color=#FF00FF80> can be used to control alpha of characters or sprite. The <sprite> tag does support additional attributes like <sprite="Name of Sprite Asset" name="Name of sprite" tint=1 color=#FF00FF80"> see the following page for more details.

    In the above case, the alpha is control in the tag itself and would require changing the string of text in order to animate the alpha of an individual sprite for instance. This is one way to handle this.

    Alternatively, it is important to understand that characters and sprites are all geometry with vertex attributes. As such these vertex attributes can be modified directly. The underlying geometry of characters or sprites can be accessed via the textInfo.meshInfo[materialIndex]... See example 23 - Animating Vertex Attribute and related scripts included in the TMP Example & Extras.

    Using a similar implementation to what is used in Example 23, you will be able to independently control the alpha of each sprite if you want.
     
    ftejada likes this.
  27. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Thanks for the reply @Stephan_B . I'm going to study the link that has put me to see if I can implement it.

    a greeting
     
  28. dormouse

    dormouse

    Joined:
    Mar 1, 2011
    Posts:
    82
    Hello Dear TextMesh Pro !
    First thanks bringing us this excellent UI component.
    I have a question regarding to new TextMeshPro
    While working with Germany and BarlowSemi Condensed (open Font from Google Font), i have some strange characters, see in the attach photo. They are in strange size and Bold.

    Font Asset Creator has been used with default settings. How can I solve this issue?

    Thanks a lot
     

    Attached Files:

  29. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Can you provide the exact string used that generated that result?

    I'll try it on my end with that same font and see if I get the same results.
     
  30. dormouse

    dormouse

    Joined:
    Mar 1, 2011
    Posts:
    82
    Höhenangst
    Ängsten

    in these two words, the special characters: ö and Ä are extremely strange in BarlowSemi Condensed Light
    for the BarlowSemi Condensed Regular is fine. Only with Light version as I observed.

    Thanks a lot for your quick support.
    Best
     
  31. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    Hi
    As I can read, the 1st post of this topic is feb 2017. Then updates, 7 pages of comments I think I won't read... Maybe there is somewhere a recent tutorial about importing 2017 projects with TMP in U2018 version ? Maybe an asset to make this in one click ? Best regards !
     
  32. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    See the Updated Notes at the end of the first post. This covers pretty much everything that was uncovered / discussed over these months.
     
  33. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    Thanks for the answer, Thomas, but it seems complicated :-( Resume the procedure in one single documented explanation would be great for newbies like me...
     
  34. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Little advice please: I only have a couple of text labels in my UI, I guess it's faster if I just remove the old TMP and install the new one and remake these labels from scratch, instead than following all the procedure to update, yes?
     
    Last edited: Oct 17, 2018
  35. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    It's there up at the FIRST POST of this thread.
    It simply can't be made shorter than that.
     
  36. shin_unity197

    shin_unity197

    Joined:
    Oct 30, 2017
    Posts:
    18
    Hi,
    I have this really strange bug on Android. When I Build and Run my app everything works perfectly fine, but the moment I upload it to Google Play Store I get a null reference from TMPro...
    I have uploaded the correct Expansion Files. Any guidance will be greatly appreciated. Thank you
    upload_2018-10-15_11-23-59.png
     
  37. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    OK thanks !
     
  38. Ryukidmm

    Ryukidmm

    Joined:
    Aug 14, 2018
    Posts:
    6
  39. Jick87

    Jick87

    Joined:
    Oct 21, 2015
    Posts:
    124
    @Stephan_B Is there any ETA on when that will be fixed?

    Thanks!
     
  40. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    This is related to Asset Bundles and not specific to TextMesh Pro and something the Asset Bundle team needs to address.

    That is one of the bug reports related to this behavior.

    There is no ETA on a resolution for this right now so you'll have to manually re-assign the material and shaders if necessary when loading the bundles.

    P.S. I was told there might be a solution in the works. I'll be at Unite in LA next week and if I have a chance, will discuss it with the Asset Bundle team there. If not, I'll look into once I am back.
     
    Ryukidmm likes this.
  41. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Unfortunately, no ETA in this yet.

    Once the release of TMP for Unity 2018.3 is available, I should have time to revisit this topic.
     
    Jick87 likes this.
  42. shin_unity197

    shin_unity197

    Joined:
    Oct 30, 2017
    Posts:
    18
    @Stephan_B
     
  43. UMSDev

    UMSDev

    Joined:
    Dec 17, 2017
    Posts:
    24
    Hello,

    Like some people here my SetText on TextMeshPro UI works fine in the editor but then I build in standalone and update it to Steam and it doesn't work. The text seems to be only set the first time.


    Also about general behaviour : I noticed that calling SetText("") to clear the text makes the componen "bug" (maybe it's expected) and refreshes all the time (with a content fitter preferred size for both) and then calling a SetText with my text is not updating anymore. I might do something wrong. I'm just trying to have a pooling system and empty my texts before putting them in the pool but then when I take them from the pool again and call the SetText it's never updated. Maybe I do something wrong ? But I couldn't find much documentation about that (Is it possible to call SetText(""), should I always activate the gameobject before setting the text ? )

    Thanks a lot for your help!
     
  44. aliak

    aliak

    Joined:
    Jan 2, 2017
    Posts:
    12
    Hi, is there any chance that you will implement this old feature request. I need to align text within a circle with auto-sizing option. I tried to mimic this with linked overflow, but it doesn't work with auto-sizisng as I need. (I need auto-sizing to be applied to the whole chain of linked object.)
    Thanks.
     
  45. mchoi

    mchoi

    Joined:
    Nov 14, 2014
    Posts:
    2
    Hi,
    I use Unity 2018.1.3f1, TexeMeshPro 1.3 now, and I set TextMeshProUGUI and default text as Korean, than syntax error happened.

    NullReferenceException: Object reference not set to an instance of an object
    TMPro.TextMeshProUGUI.GenerateTextMesh () (at /Users/me/Library/Unity/cache/packages/packages.unity.com/com.unity.textmeshpro@1.3.0/Scripts/Runtime/TMPro_UGUI_Private.cs:3015)
    TMPro.TextMeshProUGUI.OnPreRenderCanvas () (at /Users/me/Library/Unity/cache/packages/packages.unity.com/com.unity.textmeshpro@1.3.0/Scripts/Runtime/TMPro_UGUI_Private.cs:1642)
    TMPro.TextMeshProUGUI.Rebuild (CanvasUpdate update) (at /Users/me/Library/Unity/cache/packages/packages.unity.com/com.unity.textmeshpro@1.3.0/Scripts/Runtime/TextMeshProUGUI.cs:209)
    UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/CanvasUpdateRegistry.cs:150)
    UnityEngine.Canvas:SendWillRenderCanvases()

    It seems like TextMeshPro 1.3 has problem with Korean or Chinese character? or is there something that I missed?
     
  46. mchoi

    mchoi

    Joined:
    Nov 14, 2014
    Posts:
    2
    I'm look into this code what you guys are missing for, above error happened with this code.

    // if (isFirstWord || isLastBreakingChar || TMP_Settings.linebreakingRules.leadingCharacters.ContainsKey(charCode) == false &&
    // (m_characterCount < totalCharacterCount - 1 &&
    // TMP_Settings.linebreakingRules.followingCharacters.ContainsKey(m_textInfo.characterInfo[m_characterCount + 1].character) == false))
    // {
    // SaveWordWrappingState(ref m_SavedWordWrapState, i, m_characterCount);
    // m_isCharacterWrappingEnabled = false;
    // isFirstWord = false;
    // }
     
  47. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    @mchoi

    If you check the TMP Settings which are located in the "TextMesh Pro/Resources/..." folder, do you have the list of line breaking characters assigned?

    upload_2018-10-19_0-35-29.png

    If you do have these, can you copy paste the characters you are trying to display and what font file you are using?

    P.S. Since this thread is mostly about migrating from previous versions of TMP to the package manager version of TMP, please create separate posts / threads in the "Unity UI & TextMesh Pro" section of the forum. This will make it easier to follow on these posts and also make it easier for other users to find such information.
     
  48. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    Hi !
    I get the message

    But I don't see Source control mode in the Editor Settings panel ?

    And the scan process doesn't start...
    Any idea ?
     
  49. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Set Version Control - Mode to Visible Meta Files.
     
  50. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    OK, I did it, so I modified the files, but the all the titles using TMPro are now in the project replaced by 'Missing Prefab"...
    On the left : U2017 with TMPro asset
    On the right : U2018 after the procedure
     
    Last edited: Oct 22, 2018