Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

TextMesh Pro Version 1.5.0, 2.1.0 & 3.0.0 Preview 13 - Now Available! for Testing!

Discussion in 'UGUI & TextMesh Pro' started by Stephan_B, Oct 1, 2019.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    2,665
    Is there some reason the 2.1 releases don't trigger the package manager to show that an update is available? I've been on 2.0.1 for a very long time, and I just figured development had slowed down. But tonight I noticed the other versions. However, package manager wasn't showing an icon telling me I could upgrade, despite enabling preview packages:

    upload_2020-1-2_21-46-34.png

    Is that by design? Are the 2.1 releases experimental, or flagged in some way to intentionally not prompt for upgrade?
     
  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    I think preview releases don't show as upgrades to released versions. From preview to preview, there should be an indicator.

    The should be one more preview release of 1.5.x, 2.1.x and 3.0.x before taking those out of preview.

    In terms of preview vs. release, preview 3 should be in my opinion better than 2.0.1. As usual, just be sure to backup the project before upgrading just in case and report any potential issues here. I am working on preview 4 which I am hoping to have out within the next 7 to 10 days so good time to report potential issues so i can address them in that release.

    P.S. I always make a sticky post on the forum here to announce new releases.
     
    dgoyette likes this.
  3. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    2,665
    Good to know. I'll keep a closer eye on it. Thanks.
     
  4. PJbigscreen

    PJbigscreen

    Joined:
    Jul 22, 2017
    Posts:
    14
    @Stephan_B

    Also FYI, on 1.4.1, our builds are regularly freezing in TMP_SpriteAsset.UpdateLookupTables(). We have to comment this function every time the library is rebuilt in order to get builds running properly.
     
  5. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    Please test with the latest preview release which is 1.5.0-preview.3 for Unity 2018.x, 2.1.0-preview.3 for Unity 2019.x and 3.0.0-preview.3 for Unity 2020.x and let me know if you run into the same issue?
     
  6. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309
    Which TextMeshPro version support ?
    I tried the following script , but doesn't work for Asian Character.

    Code (CSharp):
    1. var osFont = Font.CreateDynamicFontFromOSFont("Arial", 25);
    2. var font = TMP_FontAsset.CreateFontAsset(osFont);
    3. var fontAsset = Resources.Load<TMPro.TMP_FontAsset>("LiberationSans SDF");
    4. fontAsset.fallbackFontAssetTable.Add(fallBackFont);
     
  7. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    Use the following instead

    Code (csharp):
    1.  
    2. string[] fontPaths = Font.GetPathsToOSFonts();
    3. Font osFont = new Font(fontPaths[index]);
    4. TMP_FontAsset fontAsset = TMP_FontAsset.CreateFontAsset(osFont);
    5.  
     
  8. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    268
    Hi @Stephan_B

    Do you know what this means? I was trying to make some font assets using the Noto font.. I might have screwed something up. :oops:

    Code (CSharp):
    1. Mesh.vertices is too small. The supplied vertex array has less vertices than are referenced by the triangles array.
    2.  
    3. Mesh.uv is out of bounds. The supplied array needs to be the same size as the Mesh.vertices array.
    4.  
    5. Mesh.uv2 is out of bounds. The supplied array needs to be the same size as the Mesh.vertices array.
    6.  
    7. Mesh.colors is out of bounds. The supplied array needs to be the same size as the Mesh.vertices array.
    8.  
    9. MissingReferenceException: The object of type 'TMP_SubMeshUI' has been destroyed but you are still trying to access it.
    10. Your script should either check if it is null or you should not destroy the object.
    11.  
    12.  
    screenshot.7.jpg
     
    Last edited: Jan 20, 2020
  9. yuewahchan

    yuewahchan

    Joined:
    Jul 2, 2012
    Posts:
    309
    It works, but it still load the system cjk font into the memory.
    As the UnityEngine.UI.Text can load unity default font Arial into memory (ASCII only) which still can show CJK character set. Is TextMeshPro also support that ?
     
  10. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    UI.Text internally searches and potentially loads several fonts into memory to find these CJK characters. In this process, you have no control over what font is selected which can vary per platform. Furthermore, there is no guarantee the selected font will work well from a visual standpoint with the font you selected. This process is hit / miss.

    The recommended way to handle this (assuming you have to use system fonts) is to (1) know what fonts are available on the platforms you are targeting. (2) at runtime in some setup / loading process to create the necessary font assets that includes the characters you will need for the given platform / language.

    The above ensures you know exactly what font is used. It ensures the font will work well for your design choices. It allows you to create only (1) font asset instead of having the system potentially load multiple fonts searching for one that contains the glyphs / characters being requested.
     
    indieDoroid likes this.
  11. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    268
    I'm also getting this error from the console.

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    Code (CSharp):
    1.                         uint secondGlyphIndex = m_textInfo.characterInfo[m_characterCount + 1].textElement.glyphIndex;
    2.  
    Do you know whats causing this? Thank so much


    *Update*

    Nevermind I figured it out. For anyone that has the same issues as I did, if you want Chinese fonts to work DO NOT use the Chinese fonts as the DEFAULT FONT ASSET. They should only be the FALLBACK FONT ASSETS. That's how I got it to work without errors. Hope it helps.
     
    Last edited: Jan 22, 2020
  12. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    What Chinese font were you using as your primary?

    Can you provide an example of the text that was causing the error? It might have been some missing character like underline / ellipsis / etc.
     
  13. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    Preview 4 of the TMP package version 1.5.0 / 2.1.0 and 3.0.0 is now available.
     
  14. TimSchmidt

    TimSchmidt

    Joined:
    Nov 23, 2016
    Posts:
    1
    I'm Getting a null ref at m_cached_Ellipsis_Character when updating from 2.0.1. It appears to be an issue with our font asset existing before update.

    I was not able to reproduce it in a fresh project using the supplied font asset. I exported our font asset and a prefab referencing it from our main project and imported into test project. When editing the prefab, if our custom font is referenced we get null refs whenever the text input is edited. When I swap reference to default asset the null ref goes away.

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. TMPro.TextMeshProUGUI.GenerateTextMesh () (at Library/PackageCache/com.unity.textmeshpro@2.1.0-preview.4/Scripts/Runtime/TMPro_UGUI_Private.cs:3056)
    3. TMPro.TextMeshProUGUI.OnPreRenderCanvas () (at Library/PackageCache/com.unity.textmeshpro@2.1.0-preview.4/Scripts/Runtime/TMPro_UGUI_Private.cs:1680)
    4. TMPro.TextMeshProUGUI.Rebuild (UnityEngine.UI.CanvasUpdate update) (at Library/PackageCache/com.unity.textmeshpro@2.1.0-preview.4/Scripts/Runtime/TextMeshProUGUI.cs:247)
    5. UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at C:/Program Files/Unity/Hub/Editor/2019.2.12f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/CanvasUpdateRegistry.cs:198)
    6. UnityEngine.Canvas:SendWillRenderCanvases() (at C:/buildslave/unity/build/Modules/UI/ScriptBindings/UICanvas.bindings.cs:72)
    7.  
     

    Attached Files:

  15. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    660
    Why does it matter if a font is missing those characters? The errors are annoying when using a font without those characters, especially when it is configured to use a fallback font that does have them.
     
  16. PandaArcade

    PandaArcade

    Joined:
    Jan 2, 2017
    Posts:
    48
    @Stephan_B I'd really love to see this resolved :D We're getting thousands of crash reports a day due to this problem.
     
  17. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    I am working on a longer term solution for the handling of special characters like Underline, Ellipsis, etc. However, let me see if I can come up with a simple short term solution.
     
  18. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    268
    Please find the font attached here. Thanks for the help.

    It happens on any game object using Text Mesh Pro. So in English it would be "Start", but in any CJKKr font that error will appear in the console.

    That error still appears even if I put the CJKKr font as a fallback font.. at the moment I don't have time to look further into it. So I deleted all CJKKr fonts. Will figure out how to address it later or hopefully it'll be fixed later on.
     

    Attached Files:

  19. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    188
    What does the includeFontFeatures parameter do in the TMP_FontAsset method below? The documentation for it seems to be unwritten at this point.
    Code (CSharp):
    1. public bool TryAddCharacters(string characters, bool includeFontFeatures = false)
    I see it's also in the FontAssetCreationSettings struct, but all the fields of this struct are also undocumented.
     
    Last edited: Feb 18, 2020
  20. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    It determines if the font features such also be extracted from the font file for the given characters. Currently, glyph pair adjustment records (kerning) is the only font feature supported but in time, this will be all other OpenType font features.

    P.S. I am currently working on making some improvements to these public functions.
     
    tessellation likes this.
  21. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    Preview 5 is now available for Unity 2018.4, 2019.x and 2020.x

    Here is the ChangeLog for this new release.

    • Revised SetText function formatting options to including ability to specify padding for integral part of the value. Revised format is as follows: {Arg Index:Integral Padding.Decimal Precision} Example: TMP_Text.SetText("Value = {0:000.00}", 10.375f); result in "Value = 010.38".
    • Fixed issue where <TextMeshProUGUI> text objects isTextObjectScaleStatic property would be ignored when OnCanvasHierarchyChanged() is called.
    • Added a Character, Glyph and Record count to those respective tables in the Font Asset Inspector.
    • Fixed potential Null Reference Exception that would occur when using text Overflow Ellipsis mode with a primary font asset that doesn't contain the Ellipsis character. Case #1209771
    • Fixed a potential Editor lockup when using text Overflow Page mode. Case #1219055
    • Fixed Input Field incorrect caret vertical alignment when using the Midline / Vertical Geometry alignment option.
    • Changes to Font Asset Generation Settings via the Font Asset Inspector will now update the existing glyphs and characters for the new settings instead of clearing them.
    • Text object InternalUpdate() used to handle potential scale changes of text objects now uses willRenderCanvases event instead of onPreCull. This avoids a potential one frame delay in updating of <TextMeshProUGUI> objects and no impact on <TextMeshPro> objects. Case #1216007
    A few extra notes about some of these changes.

    For the longest time, the Ellipsis character used by the text Overflow Ellipsis mode, had to be contained in the primary font asset assigned to the text object. So in addition to addressing the text Overflow Ellipsis mode bug referenced above, these latest changes make it now possible for the Ellipsis character to come from any other font asset or fallbacks. It cannot come from a Sprite Asset although such functionality could be added if needed.

    As some of you may know, the SetText() function always had an option to do some formatting to allow combining variables with text without any allocations unlike you would get by using string.format for instance. In this release, I improved the SetText() formatting options to allow specifying of the intergral padding as described above.

    The change related to the InternalUpdate() used to track scale changes was to play nicer with the Canvas system which updates / pushes changes to the graphic card before onPreCull which was previously used by TMP. In some cases, it was possible for TMP to update the text and its geometry but given this was done after the Canvas did "its stuff" the changes would only show up on the next frame. In the vast majority of cases this was fine but in the case where the scale of the text object was changed from 0 to 1 or some other value, it would result in the text showing up as grey squares because the canvas was still using the previous scale of 0 as the update to the new scale came right after the Canvas update as onPreCull is called.

    Please give this new release a good spin and report any issues related to these in this thread.
     
  22. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    6,657
    How far away are we from a non-preview release? Some of the bug fixes and features in the previews are tempting, but since I'll need to thoroughly test the game after we upgrade TMPro, I'd rather not risk doing it on a preview version and then have to redo it when a release version shows up.
     
  23. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    Unless new major issues are reported with Preview 5, this should be it for 1.5.0, 2.1.0 and 3.0.0.

    I do encourage everyone to test this latest release which I believe is better than the previous verified version at this point.

    BTW: What specific feature / bug fix are you referring to out of curiosity?
     
  24. unadamlar

    unadamlar

    Joined:
    Jul 7, 2015
    Posts:
    10
    After I upgraded from Preview 3 to Preview 5, whenever I click on the screen I get a swarm of this error:
    MissingReferenceException: The object of type 'CanvasRenderer' has been destroyed but you are still trying to access it.
    I rolled back the project to before I upgraded TMP and the issue was not there.
    I also rolled TMP back to Preview 3 and the issue was again not there. 123.PNG
     
    yanivng likes this.
  25. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    Can you please submit a bug report with the included project so I can take a closer look at this? I have seen a few reports of this with Preview 4 as well but I am unable to reproduce it on my end thus far.

    If you do submit the project, add the Case # to the post once you get it back from Unity via email.
     
    yanivng likes this.
  26. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    188
    This is a good change. I'd like to make another suggestion: if the Ellipsis isn't found in the fallbacks, why not look for a period character and use 3 of those as an alternative if they exist?
     
  27. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    That would be tricky given the metrics / spacing for the Ellipsis vs. 3 dots is very different and in the line breaking handling I need to be able to predict if the Ellipsis character could fit and also checking for 3 dots would add even more complexity.
     
  28. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    188
    Yes, it might be a bit more work, as all new features tend to be. ;) I believe you have method already that returns size metrics for a string of text: GetPreferredValues("...")
     
  29. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    Although we are only injected one character in the case of the Ellipsis, checking if this character can be inserted in place of the current character in the layout process did add some complexity especially given this Ellipsis character can come from a different font with different scale / metric / be affected by rich text tags, etc. Doing so with 3 characters would not be fun...
     
  30. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    188
    Understood. Thanks for considering it. It shouldn't be too hard for us to find an ellipsis fallback font, so long as it's weight, style and font metrics match well enough to look right. To be honest, we don't even use this ellipsis truncation feature right now in our games, so it's certain not a high priority for me, but I do have fonts that don't include the ellipsis glyph, which is why it's been coming up for us due to all the warnings in the console.

    I'm curious if the Ellipsis is an internationally-recognized way to truncate text? I noticed there's a middle-line ellipsis \u22ef and a two dot ellipsis \u2025, which is used in Japanese. To localize the ellipsis, you'd need to be able to set the ellipsis character (or sprite) per TextMeshPro component, depending on the selected language. Right now I assume it's hard-coded to use \u2026?
     
  31. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    The use of Ellipsis (ie. 3 dots) to indicate portions of the text has been truncated or omitted is pretty standard. See the following which includes a list of how this is used in different languages.

    Given Ellipsis is used by most browser or apps in the same manner, further reinforces this use.

    There are other unicode characters like such as one dot leader \u2024, two dot leader \u2025 and Ellipsis (3 dots) \u2026 which can also be used but these first two like most other special unicode are manually inserted in the text unlike the Ellipsis.
     
  32. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    I was finally able to get my hands on the steps to reproduce this issue. I should have a solution for it later today which will be included in Preview 6 which I will try to release over the weekend.
     
  33. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    188
    We have a custom component that arcs text around a circle by modifying the vertices via UpdateVertexData(). In TMP 1.0.56, it failed to correctly cull inside a 2D rect mask with these modified vertices. So prior to this TMP package preview release v1.5.0, we would just set ignoreRectMaskCulling = true. This property has been deprecated, but we don't know the correct equivalent in the 1.5.0 preview.

    That being said, the culling problem seems to be fixed in this newer version except in the case when the parent is scaled (for a zooming feature), the text disappears completely. If we check "Is Scale Static" then the text appears correct when zooming and culls correctly (at least we're seeing it clip inside the RectMask2D). Checking "Is Scale Static" seems unintuitive because the scale is definitely not static.

    If it helps, here's the way we update the arc (leaving renderMode as DontRender):
    Code (CSharp):
    1.  
    2. TMP_Text tmp;
    3.  
    4. void LateUpdate()
    5. {
    6.   if (tmp.havePropertiesChanged || forceUpdate)
    7.   {
    8.     tmp.renderMode = TextRenderFlags.Render;
    9.     tmp.ForceMeshUpdate(); // Generate the mesh and populate the textInfo
    10.     tmp.renderMode = TextRenderFlags.DontRender;
    11.  
    12.     // ... Here's where we modify tmp.textInfo.meshInfo.vertices
    13.  
    14.     tmp.UpdateVertexData(TMP_VertexDataUpdateFlags.Vertices);
    15.   }
    16. }
     
  34. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    Can you provide me with a working test scene / project? I would like to figure out why "Is Scale Static" having this affect on the results.

    General note to all users: I realize that asking to provide a working test scene / project requires more effort on your end. On the flip side it makes it so much easier (quicker) for me to look into these issues and to ultimately provide feedback and potential solution.
     
  35. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    188
    Sure I can email you a test scene. However, I did some more experimenting myself and it looks like an issue with DontRender and scaling the parent. While debugging, I noticed the meshInfo.mesh.bounds goes to all zeros. If I run the following code in TextArc.LateUpdate, then it works fine:

    Code (CSharp):
    1. // Force TMP to update the mesh bounding
    2. tmp.UpdateVertexData(TMP_VertexDataUpdateFlags.None);
    So I think something in the TMP code is causing the mesh bounding to get reset whenever scaling occurs and because our code generates the mesh and TMP sees renderMode = DontRender, the bounding is never updated. I believe "Is Scale Static" just causes TMP to not reset the mesh bounding on parent scaling.

    Honestly I'm not clear on why scaling of the parent affects the mesh bounding, since my understanding is that the mesh bounding is in local coordinates. Perhaps it's important because the world-space Renderer bounds needs to be updated by TMP when the parent is scaled?

    LMK if you still want a test scene.
     
    Last edited: Feb 27, 2020
  36. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    The mesh bounds do need to be updated / correct otherwise the culling system might cull geometry which it should not otherwise which might be what is happening here.

    Since you are updating the geometry yourself, see if calling mesh.RecalculateBounds(); resolves your issue.
     
  37. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    188
    I'll send you a test scene shortly. Hopefully your digitalnativestudios support email still works.

    I'm sure it would, the problem is that mesh.RecalculateBounds() runs through all the vertices and so I wouldn't want to do this every frame for every arc text. The other problem is that mesh is not accessible from script; not in meshInfo or in the CanvasRenderer.
     
    Last edited: Feb 28, 2020
  38. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    188
    Regarding this change. This is causing us a fair amount of work to go through the entire game and fix all the spacing. The changes seem to also affect Font Weights : Bold Spacing. Ideally TMP would detect a version change and automatically adjust the spacing values for us from old-way-it-worked to new-way-it-works. Or provide a tool like the GUID remapper to correct the old values. It's too error prone for us to go through by hand to find and fix this just by guessing what our old UI layouts used to look like. At the very least it would be nice if there was some method for us to manually calculate how to adjust the values to get to equivalent spacing in the new system. In other words, if our letter spacing is 7, which in the new system I believe is 7% of 1em, then what was 7 in the old system? Was it in pixels or points or something else?
     
  39. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    Once again, I apologize for the troubles resulting from this change and as I explained, spacing options going back to the initial implementation were incorrect and inconsistent between components and rich text tags.

    Spacing options in the Inspector are now in 1/100 em where 1em = 1 pixel * point size. Assuming the point size of the text object is 50 then 1em will be 50 pixels.

    Values in rich text tags are now consistent where <cspacing=50px> will be 50 pixels and again if the point size of the text object is 50 point size then <cspacing=1em> will be 1 pixel * 50 or 50 pixels

    With regards to tab spacing, it is now based on the new Tab Width which comes from the font file * Tab Multiple.

    The spacing for the styles like Normal or Bold are now also in 1/100 em. In the case of bold style, it would increase the spacing by the given amount which would be calculated the same as in the previous examples.

    In terms of conversion, the old values were based on some multiple of the width of the space character but also potentially affected by tags like <size>. This was also inconsistent between components and rich text tags which is why I ended up changing it.

    I will try taking a closer look at this over the weekend to see if I can come up with some close approximation for converting the old values to new.
     
  40. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    188
    Thanks for the details and for approximating the conversion. So far it's looking like we have to reduce our bold spacing and letter spacing by roughly half to look similar to what we had. That's a pretty significant visual difference! Of course it makes sense that the spacing be consistent and based upon the point size and not some values that didn't adjust proportionally when you adjust the point size in the text component. I fully support the change. I just think you're going to run into a lot of developer complaints and potentially "support hell" when people upgrade if you don't provide an automated way to convert these values using a transform from the old math to the new math.
     
  41. Driven

    Driven

    Joined:
    May 31, 2013
    Posts:
    68
    Hey @Stephan_B i have a very strange bug with using 3D Text and UI text with the same Font. I have a Sprite in the scene with a Shader on it and it seems that this shader clips the UI Text away but only if the 3D Text is present as well. The font file is permanently corrupted after it occurs and has to be regenerated with the font generation tool but it breaks immediately again in the same situation :(. Maybe you can have a look at it, i will send you a very small repro Project via pm if you don't mind?
     
  42. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    6,657
    From the top of my head:
    -The kerning bug fix with SDF32/16 (which I still intent to use for 1-2 fonts :) )
    -The improvements/bug fixes to Auto Size.
    -Fixes to CJK line breaks (although we haven't had too many complaints).
    -"Is Scale Static" option, might be a decent perf win for us, since most of our text does not change scale.
     
  43. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    188
    Speaking of this one, how significant is this on performance? I tried searching the forums for discussion on this feature, but I couldn't find anything.

    My understanding is that TMP does a single check for each text object about whether the world scaling has changed since the last frame. This impact seems insignificant, but where I could see "IsScaleStatic=true" helping is in the case where the scaling changes only a small amount, for example a minor pulse effect on the text. When the scaling changes, I assume it doesn't rebuild the mesh, but it may need to adjust the SDF shader/material parameters for the new screen resolution?

    If this is a major performance impact, maybe a more practical way to handle this would be to instead set a scaling percentage threshold. For example, you could define that the scaling would have to change by 10% before the expensive recalculations are performed. Just depends on how much "LOD pop" you're willing to put up with.
     
  44. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    Preview 7 is now available!

    The latest preview release of the TMP package was released over the weekend. This is Preview 7 thus skipping Preview 6 due to a package publishing error which required scrapping Preview 6 :rolleyes:

    Here is the ChangeLog which should get published later today.

    ## [1.5.0-preview.7] - 2020-03-07
    ## [2.1.0-preview.7]
    ## [3.0.0-preview.7]
    ### Changes
    - Reverted recent change to the TMP_SubMeshUI OnDisable() function that could result in a Missing Reference Exception in the GraphicRaycaster.cs script. See the following [forum post](https://forum.unity.com/threads/ver...ilable-for-testing.753587/page-2#post-5523412).
    - Fixed glyph drawing issue in the Font Asset Inspector Glyph Adjustment Table when Multi Atlas Texture is enabled and the glyph is not located in the main atlas texture or at atlasTextures[0].
    - Added support for &ltZWSP&gt tag which is internally replaced by a zero width space or \u200B.
    - Improved line breaking handling when using &ltNBSP&gt and / or &ltNOBR&gt tags where instead of breaking these line segments per character, they will break at any possible soft breaking space when these segments exceed the width of the text container.
    - Improved PreferredHeight calculations and handling when using Text Auto Size.
    - Fixed incorrect color being applied to the underline or strikethrough line segments when using <u> and / or <s> tags along with a <color> tag while at the same time applying an Underline or Strikethrough font style on the whole text object.
    - Fixed SDF Scale not getting updated when using SetText() with StringBuilder when the lossyScale of the text object changes. Case #1216007
    - Added Non Breaking Space \u00A0 and Soft Hyphen \u00AD to list of synthesized characters in the event they are not present in the source font file.
    - Fixed stack overflow issue when using TMP_FontAsset.HasCharacter and TMP_FontAsset.HasCharacters function on font assets that have circular fallback references. Case #1222574
    - Fixed atlas texture not getting set correctly to IsReadable when switching a static font asset to dynamic in the Generation Settings of the Font Asset Inspector.
    - Added check for RectTransform.sizeDelta change when OnRectTransformDimensionsChange() is called by the Canvas system to get around potential rounding error that erroneously trigger this callback when the RectTransform is using Stretch Anchor mode.
    - As requested by a few users, TMP_FontAsset.faceInfo setter is now public instead of internal.

    Please upgrade to this latest preview and report any potential issue in this thread.
     
  45. RealMTG

    RealMTG

    Joined:
    Jul 27, 2013
    Posts:
    318
    A small issue that bothers me is that the alpha fade speed on the TMP_Dropdown is hidden. You can see it in the inspector debug view but not without. It seems you've forgotten to include the field in the editor script.
     
  46. funkyCoty

    funkyCoty

    Joined:
    May 22, 2018
    Posts:
    120
    Possible oversight? On preview 7.

    Setting a TMP Text element from script to be any value, for example, "44 x1", then setting it to string.Empty, it seems the text mesh isn't ever updated.

    upload_2020-3-10_11-44-17.png
     
  47. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    Just added it for Preview 8 which I am planning on releasing at the end of this week / weekend.
     
    Last edited: Mar 10, 2020
    RealMTG likes this.
  48. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    How are you setting the text? Are you using the .text property or SetText() with or without formatting?
     
  49. funkyCoty

    funkyCoty

    Joined:
    May 22, 2018
    Posts:
    120
    Always "*.text = "
     
  50. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,263
    I tested that shortly after reading your post and everything appears to be working as expected.

    Are you able to provide me with the steps to reproduce this or some simple repro project?
     
unityunity