Search Unity

TextMesh Pro *** 3.2.0-pre.4 Release Now Available! ***

Discussion in 'UGUI & TextMesh Pro' started by HugoBD-Unity, Dec 19, 2022.

  1. tomkail_betterup

    tomkail_betterup

    Joined:
    Nov 17, 2021
    Posts:
    106
    We've got a bug to report! Emoji in a TMP UGUI component that uses a text style which uses a different font often causes the following error:

    Code (CSharp):
    1. IndexOutOfRangeException: Index was outside the bounds of the array.
    2. TMPro.TMP_Text.PopulateTextProcessingArray () (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.4/Scripts/Runtime/TMP_Text.cs:2233)
    3. TMPro.TMP_Text.ParseInputText () (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.4/Scripts/Runtime/TMP_Text.cs:1999)
    4. TMPro.TextMeshProUGUI.OnPreRenderCanvas () (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.4/Scripts/Runtime/TMPro_UGUI_Private.cs:1713)
    5. TMPro.TextMeshProUGUI.Rebuild (UnityEngine.UI.CanvasUpdate update) (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.4/Scripts/Runtime/TextMeshProUGUI.cs:216)
    6. UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/CanvasUpdateRegistry.cs:215)
    7. UnityEngine.Canvas:SendWillRenderCanvases() (at /Users/bokken/build/output/unity/unity/Modules/UI/ScriptBindings/UICanvas.bindings.cs:96)
    8.  
    It's not 100% consistent, but we find we can trigger it pretty reliably in a scene with a single TMP component by jumping in and out of play mode and changing the text style. Changing to a text style that uses the same font (or even font variants - using a font file with different weights) doesn't cause the error.
    Based on the fact that it sometimes works, and that it only stops working when we jump in and out of play mode repeatedly we would guess there's some sort of weird caching error going on.
     
    Muckel likes this.
  2. tomkail_betterup

    tomkail_betterup

    Joined:
    Nov 17, 2021
    Posts:
    106
    Oh! And while I'm at it; we've found that text styles that use a different font (again, font assets that are just variants for weight/italics etc seem fine) aren't reliable. Sometimes they render in a jumbled up way. We only see these issues when the font from the style is different from the one set in the Font Asset field.
     
    Muckel likes this.
  3. frekons_unity

    frekons_unity

    Joined:
    Sep 6, 2018
    Posts:
    21
    upload_2023-3-5_15-10-29.png
    %50 of the PC users is affected by this bug in our game. Version: 3.0.6
    Also we are not sure to use 3.2.0 pre 4. AS it says it's not ready for production and do not use it in production
    What should we do? We like the 3.0.6 version, the supported font etc. we do not want new emoji things etc. we want to stay at 3.0.6 version but can you provide the fixes to 3.0.6 version?
     
    Last edited: Mar 5, 2023
    Muckel likes this.
  4. LukeImmersive

    LukeImmersive

    Joined:
    Feb 21, 2019
    Posts:
    5
    I am encountering an issue with the Kerning setting for Hebrew test.
    For example "כריס שבוע טוב מה שלומך?" is displaying incorrectly when Kerning is enabled with characters overlapping. This seem to be an issue with all fonts from what I can see.
    Note: This wasn't the case with Kerning enabled in the previous version so I assume this is related to the change to Font Features.

    Kern Off

    Kern On
    Capture 2.PNG
     

    Attached Files:

  5. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    498
    We looked into it, but were not able to reproduce the issue. If you can reproduce consistently, could you log an issue using the bug reporter ?
     
  6. tomkail_betterup

    tomkail_betterup

    Joined:
    Nov 17, 2021
    Posts:
    106
    Gotcha! Took the time to put together a minimal repro; would love for this one to get fixed before the official release!
    Issue is IN-35240.
     
    chrismarch, Muckel and HugoBD-Unity like this.
  7. holahyunsik

    holahyunsik

    Joined:
    Apr 20, 2019
    Posts:
    5
    Hi @HugoBD-Unity

    I'd really like to know when this iOS emoji problem will be fixed?
    For Android I just look for the emoji font in the device and use that instead of adding the font file to the project - this is the best way to handle emoji because emoji fonts tend to be way way too big.

    It works fine for Android but iOS on the other hand can't do this and makes the app size about 250mb bigger.
    The game I'm developing is a very lightweight, teeny tiny 2D game so it should be under 50mb but because of this whole iOS emoji thing, it ends up being over 300mb which is ridiculous for such a small game.

    • Dynamic OS FontAsset has limited support on some iOS devices. The Apple Color Emoji font file found on OSX and several iOS devices works fine. However, the Apple Color Emoji-160px found on newer iOS devices is not support as the emoji's are encoded in JPEG format which is not supported by FreeType.
    I'd love to get rid of Apple Color Emoji so I can simply find the font, make use of that and keep the app size small.
     
    Muckel likes this.
  8. tomkail_betterup

    tomkail_betterup

    Joined:
    Nov 17, 2021
    Posts:
    106
    We'd also like to hear about the plan for this! We're currently prototyping but when we enter full production we're going to need a solution if we continue.
     
    Muckel likes this.
  9. jiraphatK

    jiraphatK

    Joined:
    Sep 29, 2018
    Posts:
    300
    The size is one issue but I struggle to see how using Unity solution is viable anyway when it doesn't even support most emojis in the first place.
     
    Muckel likes this.
  10. Muckel

    Muckel

    Joined:
    Mar 26, 2009
    Posts:
    471
    i'll don't get it....
    how long do we ask for true emoji support?
    we have 23 now... and still nothing serious...
    btw... those Atlas are also huge for TMP to use... over 10MB each... now...
    Text and Scroll rect are the biggest issues when working with Unity
     
  11. holahyunsik

    holahyunsik

    Joined:
    Apr 20, 2019
    Posts:
    5
    @HugoBD-Unity are you there?
     
  12. holahyunsik

    holahyunsik

    Joined:
    Apr 20, 2019
    Posts:
    5
  13. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    498
    Hi @holahyunsik! Sorry for the delayed response. Unfortunately, I can't give a precise ETA on it. One thing that would help is logging a ticket for it. Other users can also vote on it, which helps with visibility and prioritizing the issue. (see how to report a bug)
     
  14. Tricnic

    Tricnic

    Joined:
    Apr 6, 2014
    Posts:
    6
    I am facing a bug on the Quest 2 relating to TMP_InputField deselecting itself when shouldHideSoftKeyboard and/or shouldHideMobileInput are set to true. Digging into the TMP_InputField code, it really feels like this line of code in LateUpdate on line 1537 is the culprit.

    Code (CSharp):
    1.  
    2.             if (InPlaceEditing() && isKeyboardUsingEvents() || !isFocused)
    3.             {
    4.                 return;
    5.             }
    6.  
    On Android platforms:
    InPlaceEditing() will return true if TouchScreenKeyboard.isSupported (always true on Android) and either shouldHideSoftKeyboard or shouldHideMobileInput is set to true.

    Code (CSharp):
    1.  
    2.         private bool InPlaceEditing()
    3.         {
    4.             if (Application.platform == RuntimePlatform.WSAPlayerX86 || Application.platform == RuntimePlatform.WSAPlayerX64 || Application.platform == RuntimePlatform.WSAPlayerARM)
    5.                 return !TouchScreenKeyboard.isSupported || m_TouchKeyboardAllowsInPlaceEditing;
    6.  
    7.             if (TouchScreenKeyboard.isSupported && shouldHideSoftKeyboard)
    8.                 return true;
    9.  
    10.             if (TouchScreenKeyboard.isSupported && shouldHideSoftKeyboard == false && shouldHideMobileInput == false)
    11.                 return false;
    12.  
    13.             return true;
    14.         }
    15.  
    That's all good. If you want to handle the input yourself, set one of those two properties to true, but...

    isKeyboardUsingEvents() will never return true on Android due to this:

    Code (CSharp):
    1.  
    2.         private bool isKeyboardUsingEvents()
    3.         {
    4.             switch (Application.platform)
    5.             {
    6.                 case RuntimePlatform.Android:
    7.                 case RuntimePlatform.IPhonePlayer:
    8.                 case RuntimePlatform.tvOS:
    9.                 #if UNITY_2020_2_OR_NEWER
    10.                 case RuntimePlatform.PS4:
    11.                     #if !(UNITY_2020_2_1 || UNITY_2020_2_2)
    12.                     case RuntimePlatform.PS5:
    13.                     #endif
    14.                 #endif
    15.                 case RuntimePlatform.Switch:
    16.                     return false;
    17.                 default:
    18.                     return true;
    19.             }
    20.         }
    21.  
    What this means is that "InPlaceEditing() && isKeyboardUsingEvents()" will never be true on Android. The problem if statement will only ever be true if the input field is not focused.

    I think the if statement should be changed to:
    Code (CSharp):
    1.  
    2.             if (InPlaceEditing() || isKeyboardUsingEvents() || !isFocused)
    3.             {
    4.                 return;
    5.             }
    6.  
    If someone has more info on this and has a good reason why it should be &&, I'd love to be enlightened, but my understanding of this bit of code is telling me it should be ||.
     
    Muckel likes this.
  15. Muckel

    Muckel

    Joined:
    Mar 26, 2009
    Posts:
    471
    it's a joke... isn't it?
    sry but we pay a lot for Unity and we are professionals and we have customers who are waiting....
    damn i'll should had switched earlier to Unreal...
     
  16. jongin_unity

    jongin_unity

    Joined:
    Nov 22, 2022
    Posts:
    3
    @HugoBD-Unity
    I created a font asset with noto color emoji, but why is the sampling point size fixed at 109?
     
  17. mh114

    mh114

    Joined:
    Nov 17, 2013
    Posts:
    295
    About ligatures. I was testing a cursive font in TMP, and to no surprise it didn't work very well, as the letters don't connect. I tried updating to this new version with ligature support, and while (at least) one instance is working, most of them are not. The font is Belle Allure (https://www.jeanboyault.fr/belle-allure/).

    First picture is from OpenOffice, this is how it should look. Second picture is from Unity using TMP-version 3.2.0-pre.4. As you can see, the "el" - pair is working, others are not. I'm using dynamic font asset and can see the "el" ligature in the font atlas, but for some reason nothing more is utilized. I'd expect all of them font since one does? Any ideas?

    in OpenOffice:
    upload_2023-4-25_9-10-6.png
    in Unity:
    upload_2023-4-25_9-10-12.png
     
  18. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    498
    Hi @mh114! It seems like this Font is using Contextual substitution to implement the other features, which is currently not supported...
     
    mh114 likes this.
  19. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    498
    Hello! This seems like a bug, can you open a ticket ? (How to report a bug)
     
  20. mh114

    mh114

    Joined:
    Nov 17, 2013
    Posts:
    295
    Okay, thanks for clarifying. Is contextual substitution something that will be supported in TMP at some point, or..?
     
  21. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    498
    It's definitely something we want to support at some point, but we can't share an ETA yet.
     
    mh114 likes this.
  22. Revolter

    Revolter

    Joined:
    Mar 15, 2014
    Posts:
    216
    Input Fields with Validators work fine in Editor, but are broken on devices (iOS, Android). I am not able to input any text.
    Was working fine on a previous version
     
    xucian likes this.
  23. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    498
    Thanks for bringing this up! Would you mind opening a ticket? We'll have a look. (How to report a bug)
     
  24. Revolter

    Revolter

    Joined:
    Mar 15, 2014
    Posts:
    216
    Submitted! CASE IN-40706
    A bit offtopic, but wouldn't it make sense to ignore the Library folder when sending a bug report from within Unity? I just sent 1.5GB of data for a project that is less than 3MB
     
    HugoBD-Unity likes this.
  25. tomkail_betterup

    tomkail_betterup

    Joined:
    Nov 17, 2021
    Posts:
    106
    Is there an ETA on fixes for this version? We're having to perform a lot of awkward workarounds, but if fixes are coming soon we'll hold off.
     
  26. YD_JMysior

    YD_JMysior

    Joined:
    Aug 4, 2016
    Posts:
    60
    For anyone having issues with weird lines or character shapes - for me this turned out to be caused by outdated TMPro shaders. Updating the package in an existing project does not re-import these assets. To fix reimport the Essential Resources via Window/TextMeshPro/Import TMP Essential Resources.
     
    HugoBD-Unity and AndreaGalet like this.
  27. AndreaGalet

    AndreaGalet

    Joined:
    May 21, 2020
    Posts:
    97
    Thanks for that
     
  28. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    498
    Hi @tomkail_betterup! What specific fixes are you waiting for and are there tickets opened for these bugs ? It's the best way to ensure they get prioritized.
     
  29. tomkail_betterup

    tomkail_betterup

    Joined:
    Nov 17, 2021
    Posts:
    106
    I submitted a report for IN-35240, I've also reported a few other bugs on this post too. Generally curious to know which of all the bugs that have been reported on this post are getting addressed in the next version!
     
    HugoBD-Unity likes this.
  30. AndreaGalet

    AndreaGalet

    Joined:
    May 21, 2020
    Posts:
    97
    @HugoBD-Unity What about the issue with mobile input on webGL when the input field's context type is different from normal, example: decimal number?

    Error:

    Invoking error handler due to
    InvalidStateError: Failed to execute 'setSelectionRange' on 'HTMLInputElement': The input element's type ('number') does not support selection.
    Error: Failed to execute 'setSelectionRange' on 'HTMLInputElement': The input element's type ('number') does not support selection.
    at _JS_MobileKeyboard_SetTextSelection (...i hided this part for privacy
    /Build/farming_build.framework.js:10:234148
    at Object.touchEventHandlerFunc [as handlerFunc] (...i hided this part for privacy)
    at HTMLCanvasElement.jsEventHandler (...i hided this part for privacy)
     
    Last edited: Jun 5, 2023
  31. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    498
    Hi @tomkail_betterup! You can follow the status of each ticket using the Unity Issue Tracker. As you can see here, your bug hasn't been processed yet. We are picking bugs based on the user pain, but voting for an issue will also help to get it prioritized.
     
  32. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    498
    Hi @AndreaGalet! Please submit a bug, it's the best way to ensure we look into it. (How to log a bug)
     
  33. AndreaGalet

    AndreaGalet

    Joined:
    May 21, 2020
    Posts:
    97
    HugoBD-Unity likes this.
  34. ryg81

    ryg81

    Joined:
    Jun 24, 2019
    Posts:
    5
    can I install com.unity.textmeshpro@4.0 in unity 2020.3?
    Please help
     
  35. tomkail_betterup

    tomkail_betterup

    Joined:
    Nov 17, 2021
    Posts:
    106
    Anything we can do to bump it? You can google the error text and find quite a few references to it (or something much like it) - heck it's even been reported again on this thread! (*** 3.2.0-pre.4 Release Now Available! ***)
    I appreciate that you've got a system but it doesn't prioritise bugs that are hard to describe and only occur when using lesser used features - but we'd really like to see it fixed, given that it's makes one of TMPs most handy features basically unreliable.
     
  36. Luchunpen_0

    Luchunpen_0

    Joined:
    Aug 7, 2014
    Posts:
    58
    I have a questions about TextMeshPro 3.2.0-pre.4:
    Will it be updated to the release version ?
    Could we use it in our project without any problem or is it better to wait release?

    Thanks in advance !
     
  37. vg_swift-games

    vg_swift-games

    Joined:
    Aug 2, 2021
    Posts:
    26
    There seem to be a few reported issues, which might or might not affect you, so I would advise you to wait.
     
  38. QQMatt

    QQMatt

    Joined:
    Sep 29, 2016
    Posts:
    11
    @HugoBD-Unity Am I right in thinking that using this preview package is the only way to fix the custom validator issues with soft keyboards on Android (using 2022 LTS)? Other than waiting for 2023 LTS due to the UGUI merge.
     
  39. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    498
    Hi @QQMatt, I'm not sure about this specific issue, but all new bug fixes are indeed landing in the preview version of the package.
     
    QQMatt likes this.
  40. viet2007ht

    viet2007ht

    Joined:
    May 28, 2021
    Posts:
    3
    Hi guys
    I have a little problem with the emoji in Text Mesh Pro 3.2.0-pre.5

    upload_2023-7-21_13-49-20.png
    as you can see here, when I tried to paste an emoji into the text, it got completely while out (no color). Althrough I can modify the color I want in TextAsset Material (Face>Color). I tried to pull the alpha to zero like the pic below:
    upload_2023-7-21_13-52-2.png
    and the emojis then gone
    upload_2023-7-21_13-52-36.png


    Then I tried to drag the texture atlas into TextAsset Material (Face>Texture). I then drag that material into "Plane" 3D object I created. It perfectly fit in the material.
    upload_2023-7-21_13-55-17.png

    But when I goes back to TMP_Text one, it unfortunately didn't work...
    upload_2023-7-21_13-56-26.png

    Can anyone here help me through this part? Much appreciated
     
  41. RahmatAli_Noob

    RahmatAli_Noob

    Joined:
    Sep 13, 2022
    Posts:
    74
    Hello Everyone here,
    I am trying to Use the emoji in my project now over the Month I tried the TextmeshPro 3.2.0-pre.4.
    I made the Font Asset From the Noto Color Emoji Font.
    I drop it in the Fallback emoji text but when I try to paste the Smiley Emoji I Didn't Work.
    Any Type of Help will be Appreciated guy's.
     
  42. RahmatAli_Noob

    RahmatAli_Noob

    Joined:
    Sep 13, 2022
    Posts:
    74
    hey Hugo,
    Moreover, if I tried to Paste the Unicode of Emoji in the text field this is Showing.
    upload_2023-7-26_10-31-9.png
     
  43. viet2007ht

    viet2007ht

    Joined:
    May 28, 2021
    Posts:
    3
    I think I found an API that supports emoji in this thread here:
    TextMesh Pro - Full Emoji Support Api (emoji Sequen - Unity Forum
    I wasn't test that though but maybe it'll help in your case.
     
  44. vg_swift-games

    vg_swift-games

    Joined:
    Aug 2, 2021
    Posts:
    26
    Hey Unity, is there any ETA available on next update? Thanks!
     
    xucian likes this.
  45. tomkail_betterup

    tomkail_betterup

    Joined:
    Nov 17, 2021
    Posts:
    106
    A warning for those looking to upgrade to pre.5/6, which have been silently released - they're terribly buggy. We couldn't get it to compile at all on one Unity version, and once we fixed that our text seemed to have been scaled drastically. pre.4 has issues but appears to be the best version of TMP for now.
    Hope this saves someone some time!
     
    xucian, cnsjjj and vg_swift-games like this.
  46. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    any idea when all these pres will converge to a complete new release? thanks
     
  47. tomkail_betterup

    tomkail_betterup

    Joined:
    Nov 17, 2021
    Posts:
    106
    Our Unity rep said a couple weeks back that this package has been shelved, and isn't due any new releases. So that's it!

    I'd stick with pre4, and I guess we're supposed to move over to UI Toolkit sometime in the future - some indie friends of mine warned me to wait a little longer on that though, it's not really feature complete yet.

    I'd also heard that one of the devs would post about this officially last week, so perhaps there'll be something official soon.
     
    xucian likes this.
  48. vg_swift-games

    vg_swift-games

    Joined:
    Aug 2, 2021
    Posts:
    26
    pre4 has a lot of bugs though. So we won't have a proper TMPro update unless we update to 2023 LTS with runtime fees?
     
  49. tomkail_betterup

    tomkail_betterup

    Joined:
    Nov 17, 2021
    Posts:
    106
    My understanding is that its simply been abandoned, and won't be updated in any future versions. So you'll just have to live with the bugs in pre4. Bit of a classic case of Unity development, unfortunately. I imagine they think the future is the new UI system. I never did see a public post from the devs, which is a shame since they told me they would.
     
  50. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    this is horrible if true. do you have any new info that can confirm this? UI toolkit is garbage for complex scenarios, and in any case leaving uGUI to rot would be a stupid path for them to follow, as it's an already working, fully-featured solution. the fact that they're not overlapping them more, keeping them as completely independent instead, is just poor planning. yes, they should be independent, but you should be able to embed uGUI stuff into UI Toolkit with some custom nodes. uGUI is just too complete, I can create anything in it in a couple of hours: banking app, main menu, a tinder app, a chat app, anything -- and it works on all platforms. it's just too complete