Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

TextMesh Pro *** Version 1.5.5, 2.1.5 and 3.0.5 Now Available! ***

Discussion in 'UGUI & TextMesh Pro' started by Stephan_B, Feb 19, 2021.

  1. zh325700

    zh325700

    Joined:
    Feb 25, 2021
    Posts:
    7
    Is there any way to reduce the GC of TMP while been awaken?
    View attachment 897452

    BTW. I am using TMP2.1.6, However, I checked 3.0.6 also, there is no updating about reducing the GC of MP_TextInfo.ctor[/QUOTE]
     
  2. waltran

    waltran

    Joined:
    Feb 23, 2017
    Posts:
    36
    what's with the different version numbers :S
    obsolete changelog is not opening in your own forums...
    documentation is a hot mess...
    version numbers are just...
    no one knows what class name changed to what or what method changed to what or what that method was doing at the first place :S
    how am i supposed to upgrade old projects like this :S
    text mesh pro, no; text mesh soup!
     
  3. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    What version of the TextMesh Pro are you currently using and what version of Unity are you upgrading from?

    Version 1.5.6 is for Unity 2018.4, version 2.1.6 is for Unity 2019.4 and version 3.0.6 is for Unity 2020 or newer.

    These 3 releases are virtually the same but were needed to deal with Unity API, Package Manager and Dependency changes requiring separate packages.

    Each package releases includes a ChangeLog which is also available here.
     
    Last edited: Jul 29, 2021
  4. astorms

    astorms

    Joined:
    Jan 31, 2018
    Posts:
    50
    Do you have an estimate on when 3.2.0 will be released? The new Text Wrapping Mode option is critical in my current project.

    In the meantime, is there a way to get access to a preview version of 3.2.0?

    Lastly, I assume the new Text Wrapping Mode option will also be available on the Input Field. Is that correct? The Input Field is what I primarily need it for.
     
    MousePods likes this.
  5. shntat

    shntat

    Joined:
    Jul 28, 2021
    Posts:
    10
    Any chance of getting custom fonts to be recognized as a font?
     
  6. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Trying to get these new releases out this week.

    Yes. You will have to set it on the child text component.
     
    astorms and MousePods like this.
  7. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Do you mean fonts created using BMFont or created using some other tool and if so which tool?
     
  8. shntat

    shntat

    Joined:
    Jul 28, 2021
    Posts:
    10
    The custom font that you can create using unity editor.
    but right now i can not seem to keep unity working i
    will get back to trying to figure things out. nixie example.png
     
  9. astorms

    astorms

    Joined:
    Jan 31, 2018
    Posts:
    50
    I just tried out the new Text Wrapping Mode in the 3.2.0-pre.1 release in Unity 2020.3.15f2. First of all, thanks so much for adding this feature. The "Preserve Whitespace" option seems to do exactly what we need it to. However, there are a two issues I've noticed when using it with the Input Field specifically.
    1. It is actually not possible to change the Text Wrapping Mode option on the Input Field's child text component from "Normal" in edit mode. Entering play mode or saving the scene causes the setting to revert back to "Normal". In order to test it, I had to enter play mode and then change the option. At that point, it worked as expected.
    2. The caret does not appear in all cases that it should. Specifically, it does not appear when the input field is empty, if the input field only contains a "space", or when the caret is at the very beginning or end of a line.
    Can you let me know if you're able to reproduce those issues?
     
  10. TomTheMan59

    TomTheMan59

    Joined:
    Mar 8, 2021
    Posts:
    348
    How did you update to this? I don't see it in the package manager.
     
  11. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I am traveling these next few days so I will be slower to reply but i will try testing this tonight.
     
    astorms likes this.
  12. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    you have to enable the option to see preview packages in Package Manager. Dependi g on the version of Unity, either gear icon or Advanced option.
     
  13. TomTheMan59

    TomTheMan59

    Joined:
    Mar 8, 2021
    Posts:
    348
    I did this, but it still doesn't show up. I am on 2021 beta 6 though. Is that the problem?

    Screen Shot 2021-08-11 at 2.06.16 PM.png

    EDIT: For anyone else wondering, you can fix this by just adding this line to your packages manifest.

    Code (CSharp):
    1. "com.unity.textmeshpro": "3.2.0-pre.1",
     
    Last edited: Aug 11, 2021
    astorms likes this.
  14. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    FYI: I will be creating a new sticky thread about these new preview releases once I have back from traveling next week. I also plan on creating some new videos to go over these new features as well.

    Simply put, I didn't want to delay the release of these new package any further so I released them quietly :)
     
    astorms likes this.
  15. astorms

    astorms

    Joined:
    Jan 31, 2018
    Posts:
    50
    Just to add some more information about the caret disappearing issue, it seems to be a little more random than I initially thought, and is an issue in both Mac and Windows versions of the Editor. Below are screen recordings:

    Mac Editor:


    Windows Editor:
     
    Last edited: Aug 12, 2021
  16. koffch

    koffch

    Joined:
    Apr 19, 2018
    Posts:
    3
    Spacing Conversion Tool work wrong!? It adds the field "m_SerializedVersion: 1" and multiplies the spaces by some coefficients. But if you open the file in an Editor and change something, the unity will remove the "m_SerializedVersion: 1" field. And if you scan the project again, the Spacing Conversion Tool will change these files again.
     
  17. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    This tool should only be used when going from version 1.4.x to 1.5.x. This should only be done once when the project was using spacing adjustment like character, word, line, etc.

    In terms of the m_SerializedVersion field being overwritten, I will look into this as soon as I have a chance. Note this field is used to know if some value was previously converted but again since this process should only be used once, it would only matter if someone tried to convert the project more than once.
     
  18. koffch

    koffch

    Joined:
    Apr 19, 2018
    Posts:
    3
    Okay, now I know. I have upgraded from version 2.0.1 to 3.0.6 and the spacing has changed a lot. Hoped this tool would help, but the spacing hasn't been the same. Now I'm doing it manually.
     
  19. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Going from 2.0.1 in Unity 2019.4 to 3.0.6 in Unity 2020.x or newer would potentially require adjusting the spacing.

    I would use the tool to find all the text objects that would require spacing adjustment. See what values the tool is reporting and then test some of those values manually. Then depending on the number of text objects / prefabs, you could do the change manually or use the tool (once).
     
  20. pHghost

    pHghost

    Joined:
    Jan 7, 2018
    Posts:
    61
    @Stephan_B I am seeing a strange bug with text using outlines in the v3.2.0 prerelease version, attaching screenshots.

    In the prerelease build, the outline is showing with a brightness gradient superimposed over it. Only the outline is affected.

    v3.0.6:
    Screenshot 2021-09-04 at 12.49.40.png
    Screenshot 2021-09-04 at 12.50.30.png

    v3.2.0:
    Screenshot 2021-09-04 at 12.52.55.png
    Screenshot 2021-09-04 at 12.54.01.png

    This is the case as soon as the project is opened with version 3.2.0, no other changes made to anything else. Reverting to 3.0.6 restores the outlines to the way they should be.
     
  21. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Did you import the updated TMP Essential Resources included with version 3.2.0-pre.1?

    This latest release contains changes to the UV layout of the text geometry which was necessary for compatibility reasons with SRP. As such, this required changes to the shaders which are contained in the updated TMP Essential Resources.
     
  22. pHghost

    pHghost

    Joined:
    Jan 7, 2018
    Posts:
    61
    Thanks @Stephan_B that did solve the issue -- kind of. Importing the Essential Resources also reset some of the TMP material settings (face softness/dilate, outline thickness etc.)! I have a backup of the project and only a couple of TMP materials to update, but can imagine this could be a bit of a nightmare on bigger projects.
     
  23. pHghost

    pHghost

    Joined:
    Jan 7, 2018
    Posts:
    61
    Also, might be worth moving the instructions about installing the Essential Resources to the top of the 3.2.0 description? I completely missed it.
     
  24. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I need to talk to the Package Manager team about package description being collapsed by default which then hides the upgrade note information.

    It should only affect materials if you modified any of the materials included in the TMP Essential Resources or TMP Examples & Extras.

    I recommend never changing any of the materials or resources included / contained inside the "TextMesh Pro" folder. I also suggest never changing the default materials on font assets and instead use Material Presets to created those visual styles and to save those outside the "TextMesh Pro" folder in your own Resources or other folder structure while respecting the save path defined in the TMP Settings for those resources.
     
  25. LT23Live

    LT23Live

    Joined:
    Jul 8, 2014
    Posts:
    79
    Der Unity Team:

    Please change the TMP_InputField activation from OnMouseDown to OnMouseUp. It really makes it difficult to scroll when trying to use the component in scrolling form fields (using ScrollRects). It automatically opens the keyboard up and selects when all the user is trying to do is scroll.
     
  26. vs_dos

    vs_dos

    Joined:
    May 4, 2017
    Posts:
    1
  27. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I still need to create the video for this feature.

    In terms of the functionality of Dynamic OS Font Assets, in the Editor they are identical to Dynamic Font Assets where you have to import the font file from which you can then create a Font Asset which you can then change from Dynamic to Dynamic OS in the Generation Settings of the Font Asset Inspector.

    Changes to Dynamic OS Font Assets in the Editor are also persistent just like Dynamic Font Assets. The "Clear Dynamic Data on Build" options works the same as well.

    When creating a build, unlike Dynamic Font Assets where the source font file will be included in this build, with Dynamic OS Font Assets, the source font file will not be included.

    At runtime in a player and when trying to add new characters and glyphs to this Dynamic OS Font Asset, we will search through the system fonts looking for a font file with the same Family Name and Style and if present use it as the source. In the event, we do not find a font file with the same Family Name and Style Name, we then move on going through the potential fallbacks which could also be other Dynamic OS Font Assets.

    Let me know if you have additional questions.
     
    terry_unity747 likes this.
  28. astorms

    astorms

    Joined:
    Jan 31, 2018
    Posts:
    50
    @Stephan_B Have you been able to reproduce and fix this issue? Also, do you have an estimate on when the next version will be released? It looks like the latest is still 3.2.0-pre.1.
     
  29. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    301
    upload_2021-10-4_9-53-24.png

    Hey everyone, is there a way to set the Spacing Options on a per-font basis, instead of individually per component instance? I know you can change the Line Height per-font, but character/word/paragraph spacing seem to be missing.

    Being able to set these values per-SDF-font-asset would be very helpful when switching between multiple font assets on a single component. For example, if each character uses a unique dialogue font, or for switching between fonts based on localization language. Being able to set these values on the font asset and the component would be best case scenario as I could see instances where both would be useful.

    If this feature doesn't exist yet, I'd love to throw this out there as a feature request!
     
  30. Morphus74

    Morphus74

    Joined:
    Jun 12, 2018
    Posts:
    174
    Is 3.2.0 suppose to fix the Arabic (Right To Left) display issue?
     
  31. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    3.2.x will bring improvements to several languages as a result of the added support for Diacritical Marks and other OpenType font features such as Ligatures, etc.

    Having said that, these new features will still require the use of the RTL plugin to do the text pre-processing / shaping required for RTL languages.

    In terms of RTL display issue, what specific issue are you referring to?
     
  32. Morphus74

    Morphus74

    Joined:
    Jun 12, 2018
    Posts:
    174
    Referring to the issue that the RTL plugin fix, bad "composition/display" of arabic ligature and all other RTL language.
    Also the input field support of RTL/LTR mix of language

    Refer to this thread for some example, can provide more if needed
    https://forum.unity.com/threads/tmp-2-0-and-arabic.666295/#post-7584178
     
  33. ewittkowske_unity

    ewittkowske_unity

    Joined:
    Mar 5, 2020
    Posts:
    4
    I'm testing out this functionality on Unity 2020.3.18f1 with TMP 3.2.0-pre.2. Currently I have a TMP UI text object and I'm using the provided liberation sans font. I have updated the Generation Settings to use Dynamic OS. When I try to render Chinese characters it displays the missing character glyph and generates a missing character warning. Using the Unity Dynamic font system these characters render correctly. I have not been able to find any documentation(aside from this post) about how to setup and use the new Generation Setting. From your description it seems that when that setting is checked it should behave as the Unity Dynamic font system does and find a system font to display the text. Is this a bug or just missing setup steps?

    Is there an estimate on when 3.2 will be out of preview?
     
  34. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    LiberationSans does not contain CJK characters which is why you get the missing glyph character and warning.

    The legacy text system displays CJK characters because it uses some magic hardcoded hidden fallback list to search for those characters. Since not all fonts are available on all platforms, this list varies per platform so you get different result over which you have no control.

    With TMP there is no magic hidden list, instead you have to select what fonts you wish to use and setup your assets and fallback. This does require to you learn what fonts support what language and what fonts are available on the various platforms if you want to leverage these by using Dynamic OS font assets.

    Device manufacturers do publish lists of fonts available on their platforms / OS. Once you have this information, you can then import those fonts in the editor to setup your font assets and fallback structure to meet your needs.

    In the Editor, Dynamic OS font asset work just like Dynamic font assets where you need to import your font and create a font asset from it. However, where they differ is when you create a build, their source font file will not be included where instead at runtime on the target platform, TMP will search thru the OS fonts for a font with the same Family and Style name.

    Version 3.2 will not be out of preview for a while. However, TMP previews are essentially betas and do contain fixes. The newly added features are considered beta, not the whole release.

    P.S. I will be creating a video to go over all of this. Simply haven't had the time yet.

    If you have not already watched these two videos, I suggest you do so as they do explain the fallback system in detail and how to handle CJK.



     
    Last edited: Dec 17, 2021
    ewittkowske_unity likes this.
  35. NiteDev_

    NiteDev_

    Joined:
    Oct 11, 2014
    Posts:
    19
    @Stephan_B Is there an ETA for this feature?

    is there another forum post about how to force this OS Font were you explain it?

    Also I tried the preview versions to use the Dynamic OS feature, but when I use that version the whole local font atlas doesnt work well, the bold functionality is skipped on the font, I'm using Roboto Regular with Bold checked at the TMP component, but on the preview version bold is not working :(

    Thx for your time and sorry for bothering :D
     
  36. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The latest preview which is version 2.2.0-preview.2 for Unity 2019.4 and version 3.2.0-pre.2 for 2020.3 or newer are available and contain Dynamic OS font assets.

    What do you mean by skipped? Unless you assign / use Roboto Bold in the font weight table bold slot to your Roboto Regular, bold should be simulated when selecting the bold style on the text component. What shader are you using?

    If you are using Unity 2020 or newer, the shaders were updated which would impact the simulated bold. As such, be sure to re-import the TMP Essential Resources which contain the updated shaders.
     
  37. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    516
    We're looking at doing an upgrade to 3.2.0 soonish (thanks for fixing that issue intermixing TMP and TMPUGUI and adding GameCore TextInput support). However, this communication on this release is a bit confusing. Can you maybe lock this thread and make another related to the 3.2.0 and 4.0.0 releases or rename this topic if you'd rather keep it here? Also if you have an ETA on when preview-3 is going to be pushed that'd be super. We have custom shaders that we use in our project for TMP labels and pretty sure we're going to need to spend some time doing integrating those changes. I know that you've been working on on the next preview so I figure I'd wait until that release to do the integration work. Thanks!
     
  38. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    787
    Looking forward to the 3.2.0 as well as we're about to launch in a month or so
     
  39. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I'll create a new thread when the next preview is released which I am hoping to have available next week (provided I don't run into any unforeseen issues).
     
  40. jiraphatK

    jiraphatK

    Joined:
    Sep 29, 2018
    Posts:
    276
    Sorry to say this but you jinxed yourself hard with that one.
    I'm still waiting for full support of open type font. I've been waiting for those GPos and GSub information for a long time. Making game with non English text is a nightmare to support currently.
     
  41. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Don't count your chickens before they hatch? ;)

    I will for sure create a new thread for the next preview.

    Next preview will require a Unity update to get access to some of the new stuff which includes support for Color Glyphs (Emoji) along with extracting some GSUB data (Ligatures to begin with) and GPOS data (diacritical marks and glyph positional adjustments) from the GPOS tables. Support for the additional OpenType features like single substitution, contextual substitutions, etc. will be added incrementally.

    By optional, I mean the next release will include compiler conditionals for the features that require the Unity update but still work and contain fixes and features that don't require the next version of Unity.
     
    Ferazel likes this.
  42. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    516
    Just checking in as next week has turned into a month now. When you get a chance, could you give us an update on the status of the next release of TMP?
     
    MousePods likes this.
  43. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Adding support for Color glyphs turned out to be a lot more complex than expected. I am getting closer but since it is taking longer than expected, I am consider perhaps releasing preview 3 with the fixes and push these new things in preview 4.

    P.S. My lack of posting is also linked to trying to get this done asap
     
  44. zh325700

    zh325700

    Joined:
    Feb 25, 2021
    Posts:
    7
    Found my tmpText works incorrect with continuous zh-cn Chinese punctuations, guess there is something wrong with line-breaking or wrapping.
    case like follows:
    in pic 1. And it works as in pic 2.
     

    Attached Files:

    bida_unity likes this.
  45. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    What is the expected behavior for the above case? I presume you would expect the '。' to be on the 2nd line but not break on each of them. Correct?
     
  46. bida_unity

    bida_unity

    Joined:
    Feb 23, 2022
    Posts:
    3
    Yeah exactly
     
  47. zh325700

    zh325700

    Joined:
    Feb 25, 2021
    Posts:
    7
  48. pHghost

    pHghost

    Joined:
    Jan 7, 2018
    Posts:
    61
    LOL, I've been waiting for the next release since October 2020.
     
  49. vice39

    vice39

    Joined:
    Nov 11, 2016
    Posts:
    108
    The latest release version is broken on Apple Silicone (all font vanish) so I had to upgrade to pre-release and getting these weird artifacts on some fonts, and totally breaks (white squares) on others. Any ideas?

     
  50. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    By latest release, which version are you referring to?

    As per the package Upgrade Note, please be sure to re-import the TMP Essential Resources as the shaders have been updated.

    upload_2022-3-9_14-21-47.png
     
    Last edited: Mar 9, 2022