Version 1.4.1-Preview 1 with Dynamic SDF for Unity 2018.3 now available!

One more issue, on an input field with Ellipsis overflow mode, the text field goes blank (as in doesn’t render) when I enter a chinese character that should render from my dynamic fallbacks. Other overflow modes seem to work as expected.

Also further input causes this error:

IndexOutOfRangeException: Index was outside the bounds of the array.
TMPro.TMP_InputField.GenerateCaret (UnityEngine.UI.VertexHelper vbo, UnityEngine.Vector2 roundingOffset) (at Library/PackageCache/com.unity.textmeshpro@1.4.0/Scripts/Runtime/TMP_InputField.cs:3310)
TMPro.TMP_InputField.OnFillVBO (UnityEngine.Mesh vbo) (at Library/PackageCache/com.unity.textmeshpro@1.4.0/Scripts/Runtime/TMP_InputField.cs:3277)
TMPro.TMP_InputField.UpdateGeometry () (at Library/PackageCache/com.unity.textmeshpro@1.4.0/Scripts/Runtime/TMP_InputField.cs:3215)
TMPro.TMP_InputField.Rebuild (UnityEngine.UI.CanvasUpdate update) (at Library/PackageCache/com.unity.textmeshpro@1.4.0/Scripts/Runtime/TMP_InputField.cs:3190)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/CanvasUpdateRegistry.cs:198)
UnityEngine.Canvas:SendWillRenderCanvases()

I found that omitting the ClearMesh() call on line 2711 of TMPro_UGUI_Private.cs seems to fix this.

Hi Stephan,

I’m currently working on the UI animations of our game and I was wondering if there was a way to animate the text alignment, so that the text moves from the center to the left alignment smoothly. I could of course Animate the Bounding box, although this would lead to lots of problems with localization.

Thank you!

Unfortunately, there is not.

If I had to implement this, I would start / have TMP layout the text centered. The via a script similar to the Vertex Jitter types, modify / animate the vertices position of the characters on each line.

In the text info, I would get the first and last character of each line. Then calculate the distance between the first character (origin) to 0 (which would be the same as left alignment) and then move each character on that line that amount. Then repeat the process for each subsequent lines.

The characters on each line could be moved at uniform speed or animated.

The same could be done for each lines.

P.S. I would suggest posting your question in the main forum section (Unity UI & TextMesh Pro) as this is not specific to the Dynamic SDF system and this new release and could be something that other users are interested as well but would not find in this specific thread.

I’ll try taking a look tomorrow and provide feedback thereafter.

Hmm… I just upgraded from Unity 2019.1.0b8 to Unity 2019.1.0b9 and am getting that “wrong return type” error as mentioned earlier in this thread:

Library\PackageCache\com.unity.textmeshpro@2.0.0\Scripts\Editor\TMP_SettingsEditor.cs(332,91): error CS0407: 'Object TMP_ResourceImporterProvider.GetTMPSettings()' has the wrong return type

Aha! Deleting the library fixed it. So strange that it happened in the first place.

Although rare, I have run into similar situations where the assemblies for the package didn’t get compiled correctly when a new package is being installed. As usual, whenever it happens, I am never able to reproduce it afterwards. This is not specific to TMP but to packages which use assembly definitions.

Hi Stephan, did you have a chance to look at my Ellipsis issue yet?

I would I go about reproducing the behavior? Can you provide the steps or a repro project?

I get NullReferenceException when trying to paste a text…

I’ll need more details / steps to help me reproduce the behavior you are reporting.

What font asset are you using? What text are you copy / pasting / etc.

Also is this specific to version 1.4.0 of TextMesh Pro? If not please post in the main forum (Unity UI & TextMesh Pro) since this thread is specific to version 1.4.0 and the new Dynamic SDF system.

1 Like

yes, sorry)

Actually, I did a test - the problem was when pasting a text with both cyrillic and latin symbols (pasting only one of them doesn’t result in the error). I’m using the cyrillic range of symbols from San Francisco Medium font. If using the Roboto asset (does it come with TMP? I’m not sure if I made it or it was already there) the error doesn’t appear. Also, the error exists both in latest preview and in final version. 1.4.0 of course

Also, I keep getting warning about some missing characters like underline and ellipsis, which are not used in the scene, which also didn’t happen with 1.3.0. I tried creating a new atlas, it said there were no missing characters, but the warnings still stay - and there’s a lot of them.

Well, I fixed all of it after watching the video on asset creation =)

1 Like

Glad to know you figured it out.

P.S. Since this is the thread related to the Dynamic SDF system, another option is to create a dynamic font asset or fallback that where these characters would be added automatically.

1 Like

Just wanted to drop in to say that the upgrade worked perfectly fine for our project. Good job!

Quick question though:
Are there any improvements planned for rendering of smaller font sizes?
Event “Hinted Smooth” is far from the crisp yet anti-aliased rendering like this:
4387783--398461--upload_2019-4-3_12-52-41.png

I thought I heard TMP might be used in the editor at some point, so I guess that’s on the agenda somewhere?

Ah, doesn’t seem to be an issue after all. Can’t reproduce it exactly anymore but I’m suspecting something at my end was causing an extra line break in the input. The steps for reproducing IndexOutOfRangeExceptions in editor would be just to have the value in an input field start with an empty line:

  1. Create a TMPro Inputfield
  2. In “Text” Inspector, set Overflow to Ellipsis
  3. In “Text” Inspector, in the Text Mesh Pro UGUI text area, press enter and enter any text → bang
  4. Clicking the text in play mode → bang

Again, probably not a real-life scenario but just in case you want to have a look.

Hi.
are there any news about this issue ?

still appearing in TMP v1.4.0 with unity 2018.3.0f2.
should i recreate the component or something ? go over each override and revert or apply ?

thanks

Only the Mesh Filter / Mesh should remain which is something the prefab team needs to fix since it is not related to TMP but to the Mesh Filter component.

Please create a separate thread which will make it easier to have a discussion about this topic.