Search Unity

TextMesh Pro Preview 3 - Now Available for Testing!

Discussion in 'UGUI & TextMesh Pro' started by Stephan_B, Dec 17, 2019.

  1. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    [Packages are getting published as I write this]

    The latest preview release of the TMP package is now available for testing.

    The release versions are as follows:
    • 1.5.0-preview.3 for Unity 2018.4
    • 2.1.0-preview.3 for Unity 2019.x
    • 3.0.0-preview.3 for Unity 2020.x
    The ChangeLog is available via the Package Manager but since publishing of the ChangeLog is a separate process where it might take a few extra hours or days to publish, I am including it here for review.

    [3.0.0-preview.3] - 2019-12-16
    [2.1.0-preview.3]
    [1.5.0-preview.3]

    Changes

    • Fixed potential issue with TMP Dropdown where calling Show() and Hide() in very short interval could result in additional Blockers. Case #1194114
    • Fixed potential issues that could occur when upgrading to version 1.5.0-preview.2 or newer of the TMP package without also updating the TMP Essential Resources in the project.
    • Added check and warning when trying to create a font asset whose source font file has "Incl. Font Data" disabled in the Font Import Settings. Case #1198587 and #1198112
    • Fixed Ellipsis overflow mode issue when using small caps. Case #1198392
    • Fixed potential layout issue when adding a Layout Group to the text object itself. Case #1197614
    • Fixed Font Asset Creator issue where too many adjustment records with adjustment value of zero were added to the font asset.
    • Added support for Line Separator \u2028 and Paragraph Separator \u2029.
    • TMP shaders have been moved from "TextMesh Pro/Resources/Shaders" folder to "TextMesh Pro/Shaders" folder. See the following [post](https://forum.unity.com/threads/ver...ow-available-for-testing.753587/#post-5206853) for details.
    • Added new experimental SDF and Mobile SDF Shaders that use Screen Space Derivatives (SSD) where these shaders no longer require SDF Scale to be passed via Vertex Attributes. These shaders have higher performance overhead but are more flexible. This overhead should only be noticeable on mobile platforms.
    • Fixed potential text alignment issue where upgrading from package version 1.4.1 to 1.5.0-preview.2 would result in incorrect alignment on prefabs. Case #1198833
    • Added \u061C Arabic Letter Mark, \u200E Left-to-Right Mark and \u200F Right-to-Left Mark to list of control and non renderable characters.
    • Fixed Missing Reference Exception that would appear when expanding the Extra Settings of a TextMeshPro Preset asset. Case #1201072
    • Fixed Missing Reference Exception that would appear when editing the Vertex Color or Color Gradient of a TMP component Preset asset. Case #1201069
    • Fixed Inspector layout issue preventing enabling or disabling the Outline, Underlay, Lighting and Glow features when selecting a Preset asset material. Case #1196963
    • Revised the Create Material Preset context menu option to issue a warning and ignore materials outside the project. Case #1200109.
    • Added experimental ITextPreprocessor interface to allow users to create custom components to handle text preprocessing and shaping. This interface includes a PreprocessText(string text) function that is called when the object contains a component that inherits from this interface.
    • Added support for Unity Presets in the Editor for both <TextMeshPro> and <TextMeshProUGUI> components. Case #1191793
    • Fixed missing CanvasRenderer component issue on the Input Field Caret object.
    • Added padding to the 2DRectMask on the TMP Input Field - Text Area object.
    • Optimization to ensure the TMP Update Manager only rebuilds text objects once per frame regardless of the number of cameras in the scene.
    • And more...

    IMPORTANT NOTE

    As per the ChangeLog, the TMP Shaders contained in the TMP Essential Resources have been moved from "TextMesh Pro/Resources/Shaders/..." folder to outside of the Resources folder to "TextMesh Pro/Shaders/...".

    This change will potentially result in smaller build sizes as only those shaders referenced in a scene or scenes will be included in builds. This is important to understand as it can result in shaders not being included when font assets or materials are created at runtime. So be mindful of this change.

    For existing projects, re-importing the TMP Essential Resources will not move the shaders. This must be done manually by (1) Re-importing the TMP Essential Resources from this latest package. (2) Moving the Shaders contained in "TextMesh Pro/Resources/Shaders/..." to "TextMesh Pro/Shaders/..." folder as indicated by the red arrow in the image below.

    upload_2019-12-17_15-50-14.png

    Since moving the shaders also moved the .cginc files, you will need to also manually re-import the (new) TMP_SDF SSD and TMP_SDF-Mobile SSD shaders by simply selecting those shaders and using the context menu reimport option.

    Please install and test this latest preview release and report any potential issues in this thread. Assuming all goes well, this is likely going to be the last preview release. There are some additional issues that I will be addressing in subsequent releases but those will require a new version of Unity.

    Here is a link to the previous sticky thread for Preview 1 & Preview 2.
     
    Last edited: Dec 18, 2019
    AcidArrow likes this.
  2. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    422
    I just have to ask, especially now when the shaders got some "love": Why do we have to keep importing standard TMP stuff? It can't be the shaders because URP references shaders from its own package just fine. I don't see having the standard font in the package as being a major problem either. I guess only if you make it a dynamic font it can cause problems. Is the font asset the problem?

    I'm just curious because I generally hate being forced to import extra stuff and assets putting their stuff in my folder. TMP isn't so bad, just me being nitpicky. :rolleyes:
     
  3. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Most of the time, font assets or sprite assets or material presets are references by some object or prefab in which case these resources can be located any where.

    However, in order to be able to reference Font Assets or Sprite Assets in the <font="Font Asset Name"> or <sprite="Sprite Asset Name"> these assets must be contained within a Resources folder as they are not referenced by anything and as such would be excluded from the build. This is why these resources have to be located as specified in the TMP Settings and inside a Resources folder.
     
    Hertzole likes this.
  4. yanivng

    yanivng

    Joined:
    May 21, 2017
    Posts:
    43
  5. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    yanivng likes this.
  6. yanivng

    yanivng

    Joined:
    May 21, 2017
    Posts:
    43
    After upgrading to 1.5.0 preview-3, getting the following compilation error message.
    (Using Unity 2018.4.4.f1)
     

    Attached Files:

  7. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    You will need to upgrade to a newer version of 2018.4. I would suggest the latest 2018.4 LTS which is 2018.4.14f1.
     
    yanivng likes this.
  8. Sean-SandboxVR

    Sean-SandboxVR

    Joined:
    Dec 5, 2019
    Posts:
    5
    Hi,
    Does any of these supports proper text displays in 2019.3.0 HDRP VR?
    Can't seems to get any of them display on both eye using single pass instanced.
     
    Last edited: Jan 7, 2020
  9. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    HDRP support is not yet available but will be coming soon.

    HDRP support is likely to be a separate package with shaders and dependency on Shader Graph and SRP / HDRP.
     
  10. Sean-SandboxVR

    Sean-SandboxVR

    Joined:
    Dec 5, 2019
    Posts:
    5
    Thanks Stephan! Any estimates on that?
     
  11. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Hoping to have something available within the next 30 - 60 days.

    The timeline is affected by ShaderGraph as we are waiting on some added functionality like the ability to specify and use custom material inspectors for those custom shaders / graphs.

    A set of HDRP shaders could be released with custom material inspectors but that would make those shaders no longer editable in Shader Graph which is something we would to provide to enable the ability for users to tweak those shaders to add things like support for multiple outlines, etc.
     
  12. Sean-SandboxVR

    Sean-SandboxVR

    Joined:
    Dec 5, 2019
    Posts:
    5
    Thanks for your prompt reply Stephan.
    I have been encountering issues with the normal UI canvas element as well in HDRP Single pass instanced setup.
    This is most likely caused by the same shader issue, am I right on that?
     
  13. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    By normal UI Canvas elements, do you mean UI Text?

    What specific issues have you been encountering?
     
  14. Sean-SandboxVR

    Sean-SandboxVR

    Joined:
    Dec 5, 2019
    Posts:
    5
    Yes UI Text included, as well as sprites used in canvas.

    As far as I have tried, they are using the same UI/Default shader across URP and HDRP.
    However in VR, the UI canvas doesn't work in HDRP with single pass instanced being turn on.
    For LWRP/URP, I do not have that issue thou.
     
  15. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I would suggest
    (1) making sure you are using the latest URP / HDRP packages.
    (2) See if the behavior is the same in newer versions of Unity.
    (3) If the issue occurs everywhere, submit a bug report with a repro project as this is something the URP / HDRP team needs to look at.

    P.S. I know that batching was added to SRP so check if this could be related to that (if this functionality appeared to be working correctly in the past that is).
     
  16. Sean-SandboxVR

    Sean-SandboxVR

    Joined:
    Dec 5, 2019
    Posts:
    5
    Hey Stephan,

    I'm using HDRP 7.1.7, Unity 2019.3.0f5. I could submit a bug with the repro project.
    In fact I was testing it using the XR-Interaction toolkit demo.

    1. Tested in VR with single pass instanced. (Oculus loader and tracked pose)
    2. Install HDRP package.
    3. HDRP wizard and fix all.
    4. Upgrade project mats to HD Mat
    5. Run it and the right eye would immediately signals you on the missing single pass instanced data.

    And yes just check the shader, you are right about SRP batcher saying not compatible!

    upload_2020-1-14_12-20-16.png
     
  17. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,941
    Hi Stephan_B,
    I'm using Unity 2020.18a and all the Textmesh pro text look extremely bad when in gameview i apply an aspect ratio. I double checked on 2019.3 and there it looks fine. any advise why its happening?

    Capture.PNG
     
  18. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    There should not be any changes there so I will need some repro project / scene to help me reproduce the behavior.

    The text being blurry points to the SDF Scale being incorrect. The CanvasScaler does impact the SDF Scale but it should be updated correctly. The handling of the SDF Scale is the same between all preview 3 versions of TMP.
     
  19. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,941
    Please put few TMPro labels on canvas and check it on a windows unity where gameview is only locked to low resolution version and you will see this issue when you apply a portrait aspect ratio (mobile based) in Unity 2020.1.
    If you still dont see it then ill provide you a sample scene, but you will hv to use above setup.
    Thanks
     
  20. yanivng

    yanivng

    Joined:
    May 21, 2017
    Posts:
    43
    Dear @Stephan_B ,
    Can you please provide an updated estimation on preview 4 release?

    Thank you,
    Yaniv
     
  21. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Will do my best to release it this week / weekend.
     
    yanivng likes this.
  22. robal1991

    robal1991

    Joined:
    Mar 31, 2016
    Posts:
    33
    Has something changed with character spacing? In preview-3 characters are much more tight. Do I need to regenerate font assets when upgrading from 2.0.1 to 2.1.0?
     
  23. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    There were changes to spacing in 2.1.0-preview.1 as the previous handling was incorrectly handled.

    - Revised Character, Word, Line and Paragraph spacing adjustments to be in font units (em) where a value of 1 represents 1/100 em.