Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

TextMesh Pro Version 1.5.1, 2.1.1 & 3.0.1 - Now Available! for Testing!

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

  1. michaeleconomy

    michaeleconomy

    Joined:
    Aug 28, 2018
    Posts:
    58
    Ok, so if removing the force child expand doesn't fix it (it doesn't), what are my other options here?

    If i remove the bolding, everything works perfectly. is there a reason the preferred size calculations might be incorrect because of the way i've linked the bold font in there? before i linked the bold font in, the bolded text was all monospaced.

    Also, if i just click bold on the unbolded text, it thinks it needs an extra blank line.
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Bold would add extra spacing where that might be enough different between the text laying out on 1 line vs. 2 given whatever size the layout components are providing.

    P.S. Bold spacing can be adjusted per font asset in the font asset inspector. Default value is 7

    I will double check the preferred values but that should have been address in Preview 12.
     
  3. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    This is really frustrating. I can't seem to replicate the rendering issue in a standalone project, but it happens all the time in my own project which I have 1000's of users using so I just won't be able to upgrade TMP to the next version :(
     
  4. michaeleconomy

    michaeleconomy

    Joined:
    Aug 28, 2018
    Posts:
    58
    Thanks I'll experiment with that.




    I found another error while trying to import sprite textures:

    Destroying assets is not permitted to avoid data loss.
    If you really want to remove an asset use DestroyImmediate (theObject, true);
    UnityEngine.Object:DestroyImmediate(Object)
    TMPro.TMP_SpriteAssetImporter:DrawEditorPanel() (at Library/PackageCache/com.unity.textmeshpro@2.1.0-preview.13/Scripts/Editor/TMP_SpriteAssetImporter.cs:98)
    TMPro.TMP_SpriteAssetImporter:OnGUI() (at Library/PackageCache/com.unity.textmeshpro@2.1.0-preview.13/Scripts/Editor/TMP_SpriteAssetImporter.cs:40)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  5. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    You submitted Case #1245445. Does the issue still occur in that release as far as you know?
     
  6. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    What are the steps you are taking to produce this behavior?
     
  7. michaeleconomy

    michaeleconomy

    Joined:
    Aug 28, 2018
    Posts:
    58
    whenever i try and use the sprite importer when i hit the "create sprite asset" it does this.
     
  8. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Does the sprite asset already exist?

    Can you provide me with the sprite texture that you are using along with the .json file from TexturePacker?
     
  9. michaeleconomy

    michaeleconomy

    Joined:
    Aug 28, 2018
    Posts:
    58
    If i just use emojione files that are included i get this error.
     
  10. michaeleconomy

    michaeleconomy

    Joined:
    Aug 28, 2018
    Posts:
    58
    Related: When i do import the file (despite this error) it seems like it's working, except for the fact that the unicode values are not set (i'd want them set to the same as the name?) is there an easy way to do this?
     
  11. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The Sprite Importer is designed to allow users to create a Sprite Asset using a sprite texture and JSON Array file that was created using TexturePacker.

    To create Sprite Assets from a texture within Unity, you would first use the Unity Sprite Editor to define the sprites for this texture and then select it and use the context menu "Create - TextMesh Pro - Sprite Asset" option.
     
  12. michaeleconomy

    michaeleconomy

    Joined:
    Aug 28, 2018
    Posts:
    58
    Thanks for looking into this!

    I created a png and json with texture packer (attached). I'm just pointing out that if i try the same thing with the examples Assets/TextMesh Pro/Sprites (which seems to be the same format), I also get the same error.
     

    Attached Files:

  13. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Thanks for this last clarification. I am now able to reproduce the error which occurs when the Sprite Asset already exists in that same folder location.

    Looking into it and will post as soon as I have more information.
     
    michaeleconomy likes this.
  14. michaeleconomy

    michaeleconomy

    Joined:
    Aug 28, 2018
    Posts:
    58

    Circling back, when i set bold spacing to 0 in the bold SDF, every thing works beautifully!
     
  15. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I'll take a look as soon as I can about the bold perhaps not contributing correctly to the Preferred value calculations.

    With regards to the Sprite Asset Importer, I have that resolved already and the fix will be included in the next release of the TMP package.
     

    Attached Files:

    michaeleconomy likes this.
  16. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    No, that issue has been fixed in my example attached to the case. This is a different, but similar problem.
     
  17. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    What is the new / similar problem?

    You did update the TMP Essential Resources which contain the updated shaders right?
     
  18. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
  19. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Do you still have this issue if you disable the RectMask2D or UIMask on the ScrollRect?

    Can you provide me with some repro project or private access so I can take a closer look?

    This is basically the last outstanding issue in this release series and as such I really want to fix it :)
     
  20. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Cool :) ok I'll give it a test.
    ...
    I have tested and If I disable individually either the ScrollRect or the RectMask2D everything renders correctly.

    If both are enabled the text stops rendering again.

    I'm sending you a video that might help.
     
    Last edited: Jun 5, 2020
  21. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Good news @Stephan_B,

    I managed to replicate it in a small example project. I have sent it to you today along with a video showing you what happens yesterday.

    Video Showing Issue: 1253404
    Example Project: 1253625

    If you need any additional info just give me a shout.

    Justin
     
    Stephan_B likes this.
  22. habitoti

    habitoti

    Joined:
    Feb 28, 2013
    Posts:
    141
    Hi @Stephan_B,
    I am using TMP extensively to make my game UI look good with 9 languages, incl. JA and ZH. I am always stunned by the amount of options you provide to make texts behave graceful even when translations get longer than expected (Auto sizing, width compression etc.) and the various support to create proper text assets.
    Just lately I discovered the option to link two separate texts, so that one can spill over the overflow of another, which was exactly one use-case I had and I was about to create a feature request -- before I found you had thought of it already :) (BTW: has a bug in prev. 12 & 13, opened ticket already, incl. demo project...).

    That being said, there are still two things I am missing. Maybe I just don't find it, otherwise it might inspire you for yet more useful features:
    • Sometimes several labels belong together, like a set of stacked buttons or information belonging to a group of data etc. If now one of the labels get's smaller due to auto-sizing, it looks a bit weird in the context of the others that stay the initially intended size. So it would be great to be able to link some texts into a logical group of texts, and if auto-sizing takes place, the smallest size should be applied to all of them, so that the group of texts is still consistently sized.
    • I love the vast amount of options to setup a font asset. Juggling with several languages and fallback assets (non-dynamic) provides one additional challenge, though: I'd like the same amount of inclusion options also for exclusion. So when reading a text file for character creation of Japanese characters, I'd like to at the same time exclude all the Latin characters that my default font already has and which are pulled from that one anyway (general font styles of both are similar already).
      Or when having created a text asset with all required Chinese characters for my in-game static texts, I'd like to add another text asset for the official list of 3500 regularly used Chinese characters MINUS those that my other asset already has.
      This could also be just an option to remove existing characters from the preceding lookup chain if the asset is plugged into a fallback setup.
    Does that make sense? It would make my life so much easier ;-)

    Regards, habitoti
     
  23. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Thank you for submitting the bug report with repro project. As usual, this has made it easy to identify and resolve the issue which was related to culling.

    Since the Cull() function is called before text generation, the geometry bounds of the previous text content were used as opposed to those of the newly updated text which in some cases could result in incorrect culling of the text object.

    The solution was trivial which is to force an early update of the text geometry bounds when properties of the text object resulting a the layout being dirty.

    The fix will be in Preview 14 which I will be releasing shortly.
     
    SketchWork likes this.
  24. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Quick short reply...

    Great suggestions!

    See the following post about auto-size. A new component like Text Auto-Size Group could be created which similar to a Canvas Group would require these text components to be child of this component. Alternatively and perhaps more flexible, some manager to allow defining auto size groups. Not sure yet how to best handle this but this is something I would like to address at some point.

    Second feature request isn't new either and also make a lot of sense.

    What bug report are you referring to? Do you have a case?
     
  25. habitoti

    habitoti

    Joined:
    Feb 28, 2013
    Posts:
    141
    Sure, it's case 1251283. Sample project is attached to it.

    Regards, habitoti
     
  26. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I'll try looking at the case tomorrow.

    Edit
    I looked at the case quickly and understand why the issue is occurring. Should be an easy fix that I should be able to add to Preview 14 which I would like to release tomorrow.
     
    Last edited: Jun 8, 2020
    SketchWork likes this.
  27. habitoti

    habitoti

    Joined:
    Feb 28, 2013
    Posts:
    141
    Yeah, doing it myself was the first thing I tried, based on what I felt what the longest text (based on the usually longest French texts). However adding Japanese I learned that you actually can't really tell. Sometimes it's just 3 characters, sometimes 10, and sometimes with a tremendous run length of characters. Right now I autosize them all and then later look for the smallest and apply it to all at runtime. That's of course quite some additional effort...

    Regards, habitoti
     
  28. alan-lawrance

    alan-lawrance

    Joined:
    Feb 1, 2013
    Posts:
    360
    Does it look like preview.14 will make it out today? Sorry to pester, but we have a new update to go out that we are holding back until we can try it out.
     
  29. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Discovered a new issue related to Culling changes which is now resolved. I will be doing additional testing tonight and assuming I do not run into any new unforeseen issue, will still try to release Preview 14 late tonight.
     
    livingtarget and SketchWork like this.
  30. alan-lawrance

    alan-lawrance

    Joined:
    Feb 1, 2013
    Posts:
    360
    Thank you Stephan!
     
  31. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    Awesome @Stephan_B ! Preview 14 has fixed my issues. I'll do some more testing before I send it out to my app beta testers.

    All the best, Justin
     
    Stephan_B likes this.
  32. alan-lawrance

    alan-lawrance

    Joined:
    Feb 1, 2013
    Posts:
    360
    When updating to Preview 14, is there anything that needs to be done besides "Import TMP Essesntial Resources"?

    Like regenerating font atlases or anything? Just want to make sure I don't miss an important step.
     
  33. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    None of the TMP Essential Resources or TMP Examples & Extras have changed between Preview 13 and 14. There were changes to these resources in previous release so I would recommend importing both if you haven't updated them previously.

    There is no need to update any of your assets.
     
  34. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,091
    This issue was the same issue as https://forum.unity.com/threads/ver...ilable-for-testing.753587/page-4#post-5885075
    and it is fixed in 2.1.0-preview.14 awesome!

    Now I've ran into the following, since a few patches back in 2019.3.x it is possible to turn off masking by setting the 'Maskable' boolean on the component. This seems to be included in the
    MaskableGraphic
    class.
    Will this be supported by the supported by the
    TextMeshProUGUI
    class?
     
    AliAlbarrak likes this.
  35. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Do you mean the disabled the UI Mask or RectMask2D? That should already be functional on the RectMask2D and as far as I know on the UI Mask as well although I haven't tested that lately.
     
  36. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,091
    I mean this boolean

    Maskable boolean.png

    Maskable boolean TMProUGUI.png

    I don't see it available under the settings of the TextMeshProUGUI component.
    I'm not sure whether that is the same you're talking about.
     
  37. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,588
    Any ETA when I can expect 1.5.0 verified for 2018.4? I'm desperately waiting for it, because of this fix, but don't want to pull in preview packages.

    Perhaps release smaller updates more often in the future. 1.5 seems to be in preview almost a year (Oct 2019). A single massive release per year is less valuable than regular smaller (bug-fix) updates for me. Just some food for thought.
     
  38. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I am currently working on the non preview release. It will be verified shortly thereafter as to avoid further delays.

    In terms of more frequent releases, that is the goal but can't release it until it is ready. This latest release included major changes that simply required more time to get to a place where I felt based on user feedback that is was good enough to take out of Beta (which is what preview is in this case).
     
    Peter77 likes this.
  39. Aleksander87

    Aleksander87

    Joined:
    Jul 7, 2017
    Posts:
    20
    Greetings,
    I installed the latest version (v2.1.0, preview 14)
    I inherited from TextMeshProUGUI class, and I created a custom inspector for that component.
    I get some editor errors every time I enter play mode or recompile scripts. (see image with stack trace)
    It's just an editor error but it's a bit annoying.

    Thanks!
    Alex
     

    Attached Files:

  40. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    349
    I'm reading texts from a database and some of them have emojis. When they're the first thing after a line break this happens:



    Is this a known bug?
     
  41. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Known bug that has already been fixed :)

    Fix will be in the next package release which I am hoping to have available within the next few days.
     
    ratking likes this.
  42. AdamVlcek

    AdamVlcek

    Joined:
    Aug 8, 2013
    Posts:
    4
    TMP is great, but still contains a lot of bugs. Found some in TMP 2.0.1 (verified) and the same in 2.1.0 (prev14) regarding TMP_InputField. Using Unity 2019.2.21f1

    1. When I assign a string which has more characters than characterLimit to text, the whole app crashes on Android. It seems to work OK in the editor and on iOS, but on an ancient Android 4.1 (at least), this causes an unhandled exception and crash of the whole app. Can be prevented by checking, but still a crash. ;)
    2. InputFiled has problems with '\n' in the string. If I have a lineLimit = 2 and I start editing a 2-line text by hitting backspace at the end of the second line, the whole second line is removed and keyboard hides. This seems to work correctly in the editor, but was a problem on iOS and Android devices. Partially hotfixed by removing all newlines from edited string, but it would be nice if it actually works.
    3. If I have lineLimit = 2 and high enough characterLimit, and I continue writing up to the point where a 3rd line should start, a whole word just disappears. No, it is not hidden. It disappears from the text and I can continue writing indefinitely, one word disappearing after another. An important things seems to be that there must be at least 2 words on the 2nd line. If there is just one very long word, it stops accepting new characters after I reach a fontSizeMin limit of Auto Size. Reproducible in editor and on devices.
    Not sure if anything of this was actually reported, but if not, I can provide additional details.

    PS: Also would be supercool if you can get around the annoying Android keyboard stealing the whole focus and closing whenever user taps at anything in the remaining portion of the screen rendered by Unity. And it would be nice to be able to get the keyboard height for Android. ;)
     
    SketchWork likes this.
  43. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    I have also managed to replicate a bug that has been bugging me for a while now. I'll post up the repro project in a report for you @Stephan_B

    Justin
     
  44. SketchWork

    SketchWork

    Joined:
    Jul 6, 2012
    Posts:
    254
    @Stephan_B
    I have submitted the bug report and this is the bug image of what happens. The bug image also attached to the bug report including the repro project.
    upload_2020-6-29_11-45-12.png

    Case 1259393 (Preview 14)

    Justin
     
    Last edited: Jun 29, 2020
  45. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Thank you for taking the time to submit the bug report.

    I had a chance to look at it and the behavior is the result of having a <CR> after the "e" in Roadhouse and the </color> tag.

    By design Carriage Return <CR> returns the pen position / advance back to the start of the line resulting in the subsequent text being written on top of the previous text.

    Most like, when deleting some control characters in the initial string, the Line Feed <LF> was removed but the <CR> left in there.

    On OSX, it is pretty common for text to contain both <CR><LF> whereas on windows, text usually only contains <LF>.
     
    SketchWork likes this.
  46. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    390
    I'm having a similar problem to @ratking in 1.5.0.preview-14 where if there are all sprites on one line then the line spacing is incorrect. This problem didn't exist in previous versions. What's the ETA on the fix?

    Screen Shot 2020-06-30 at 3.47.32 PM.png
    When you add a character (e.g. "1") to the line, then the spacing is corrected:
    Screen Shot 2020-06-30 at 3.48.19 PM.png

    UPDATE: There's a work-around for this bug, see this thread.
     
    Last edited: Jul 1, 2020
  47. leutnant_kane

    leutnant_kane

    Joined:
    Apr 29, 2015
    Posts:
    40
    There is also still a bug present when using a regular mask to mask dynamically changing TmproUGui Elements. The text will then sometimes just vanish and only get rendered again after disabling and enabling the Text element or changing some settings in it. The bug doesn't appear for RectMask2D, maybe it was fixes there already?
     
  48. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I did make changes to UI Mask handling in the up coming release. Hopefully that resolves this masking issue.
     
    dKleinTriCAT likes this.
  49. Grhyll

    Grhyll

    Joined:
    Oct 15, 2012
    Posts:
    119
    Hi,

    It would be super nice if TMP could handle missing characters without NullRef (a warning with the missing character would be awesome). I reproed the issue in an empty project, where I created a simple font with only the character "a" in it, then deleted the default TMP fonts (I'm not super fond of the fact they are automatically used as fallbacks without any warning or whatever, I was very confused at first as to why my font with only "a" could print "ab"), and finally added a UGUI label in my scene with the text "ab" as well as a script to trigger a GetPreferredValues on it.

    It gives errors such as:
    Code (csharp):
    1.  
    2. NullReferenceException: Object reference not set to an instance of an object
    3. TMPro.TextMeshProUGUI.GenerateTextMesh () (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMPro_UGUI_Private.cs:2025)
    4. TMPro.TextMeshProUGUI.OnPreRenderCanvas () (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMPro_UGUI_Private.cs:1656)
    5. TMPro.TextMeshProUGUI.Rebuild (UnityEngine.UI.CanvasUpdate update) (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TextMeshProUGUI.cs:209)
    6. UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at C:/Program Files/Unity/Hub/Editor/2019.4.1f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/CanvasUpdateRegistry.cs:210)
    7. UnityEngine.Canvas:SendWillRenderCanvases()
    8.  
    9. NullReferenceException: Object reference not set to an instance of an object
    10. TMPro.TMP_Text.CalculatePreferredValues (System.Single defaultFontSize, UnityEngine.Vector2 marginSize, System.Boolean ignoreTextAutoSizing) (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Text.cs:3942)
    11. TMPro.TMP_Text.GetPreferredWidth () (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Text.cs:3540)
    12. TMPro.TMP_Text.get_preferredWidth () (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Text.cs:1275)
    13. UnityEditor.Events.LayoutPropertiesPreview+<>c.<OnPreviewGUI>b__8_2 (UnityEngine.UI.ILayoutElement e) (at C:/Program Files/Unity/Hub/Editor/2019.4.1f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Editor/UI/LayoutPropertiesPreview.cs:100)
    14. UnityEngine.UI.LayoutUtility.GetLayoutProperty (UnityEngine.RectTransform rect, System.Func`2[T,TResult] property, System.Single defaultValue, UnityEngine.UI.ILayoutElement& source) (at C:/Program Files/Unity/Hub/Editor/2019.4.1f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Layout/LayoutUtility.cs:168)
    15. UnityEditor.Events.LayoutPropertiesPreview.OnPreviewGUI (UnityEngine.Rect r, UnityEngine.GUIStyle background) (at C:/Program Files/Unity/Hub/Editor/2019.4.1f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Editor/UI/LayoutPropertiesPreview.cs:100)
    16. UnityEditor.ObjectPreview.OnInteractivePreviewGUI (UnityEngine.Rect r, UnityEngine.GUIStyle background) (at <a0a9ad37e16b4f7cb955e1101b72d4cc>:0)
    17. UnityEditor.ObjectPreview.DrawPreview (UnityEditor.IPreviewable defaultPreview, UnityEngine.Rect previewArea, UnityEngine.Object[] targets) (at <a0a9ad37e16b4f7cb955e1101b72d4cc>:0)
    18. UnityEditor.ObjectPreview.DrawPreview (UnityEngine.Rect previewArea) (at <a0a9ad37e16b4f7cb955e1101b72d4cc>:0)
    19. UnityEditor.InspectorWindow.DrawPreviewAndLabels () (at <a0a9ad37e16b4f7cb955e1101b72d4cc>:0)
    20. UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    21. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    22. UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    23. UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Boolean straightY, System.Single pixelsPerPoint, System.Exception& immediateException) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    24. Rethrow as ImmediateModeException
    25. UnityEngine.UIElements.UIR.RenderChain.Render (UnityEngine.Rect viewport, UnityEngine.Matrix4x4 projection, UnityEngine.UIElements.PanelClearFlags clearFlags) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    26. UnityEngine.UIElements.UIRRepaintUpdater.DrawChain (UnityEngine.Rect viewport, UnityEngine.Matrix4x4 projection) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    27. UnityEngine.UIElements.UIRRepaintUpdater.Update () (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    28. UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    29. UnityEngine.UIElements.Panel.UpdateForRepaint () (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    30. UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    31. UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    32. UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <78b213560771414e9fa6f1b95f5ad8bb>:0)
    33. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <819de1aa368e45faa4f78e26c97c62b0>:0)
    It's pretty annoying because we don't want the default fallback, and we often need to be able to run the game after a small update on the localization, without having to rebuild all of our fonts for all of our languages, which is a very long process.
    Ideally, I think it should just ignore the missing character with a warning, but a NullRef obviously breaks the current update.

    Btw I have tried to simply add a "m_textInfo.characterInfo[m_characterCount + 1].textElement != null" check in TMP_Text and TMPro_UGUI_Private (before calculating the secondGlyphIndex), it seems to fix the NullRefs, but I'm not sure if it really fixes everything and can't cause regressions (also I can't propagate that change to the rest of the team through git, for this I guess I'd need to import the whole source in the project, but unless I really have to I'd rather avoid that).
     
  50. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    349
    Small bug(?) I noticed recently: <u> doesn't work with whitespaces.
    Code (html):
    1. <u>   </u>
    does not produce underlined spaces. I had to write
    Code (html):
    1. <u><alpha=#00>xxx<alpha=#ff></u>
    to see something.