Search Unity

Stop TextMeshPro Updating Itself When It Is Moved

Discussion in 'UGUI & TextMesh Pro' started by NitromeSteed, Apr 9, 2018.

  1. NitromeSteed

    NitromeSteed

    Joined:
    Jul 28, 2017
    Posts:
    17
    I have scrolling credits using TextMeshPro.

    When I move the transform holding the text, the letters wiggle in size. This is very unpleasant to look at - the text is constantly wiggling up and down as it scrolls.

    If I move a standard Text UI component, this does not occur. I assume that TextMeshPro is trying to be clever and updating itself as it moves. This results in the awful looking wiggling on the screen.

    How can I stop TextMeshPro trying to adjust itself? I have tried adjusting all the settings and nothing works. I am currently considering rendering the entire output to a static Texture so this stops happening. This is a very silly thing to have to do.
     
  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    4,004
    Moving the transform of TextMesh Pro object should not trigger regeneration of the text unless some of the properties of the text or scale have changed.

    In order to help isolate the root cause of the behavior you are reporting, I will need more details.

    Is the text static or is it changing each frame?

    Are you using Text Auto-sizing?

    Are you using a scrollview or have you implemented the movement on your own?

    When the RectTransform Anchor mode is set to stretch, sometimes moving the object can result in OnRectTransformDimensionsChanged being triggered eventhough the RectTransform size has not changed.

    Can you provide me with a Repro Scene / Project to look at? Submitting a bug report with the project would work.
     
  3. NitromeSteed

    NitromeSteed

    Joined:
    Jul 28, 2017
    Posts:
    17
    No scrollView. Static text. Auto-sizing has been tried with and without to no effect. The anchor was set to stretch, this has been disabled but has had no positive effect.

    I suspect this is a shader issue, despite trying multiple settings the text comes out with no anti-aliasing. Normally we wouldn't want any (the game is pixel art and already has a low resolution) but the text is scrolling slow enough for it to be an issue. I'm not ruling out the possibility that I've assumed I've tried settings I haven't. There are a LOT of settings.

    I've created a sample project that demonstrates the issue alongside the original Text UI component and submitted a bug under this title:

    TextMeshPro does not anti-alias when moved - causing "wiggling" at lower resolutions.
     
unityunity