Search Unity

TextMesh Pro Text Mesh Pro text position not following parent transform

Discussion in 'UGUI & TextMesh Pro' started by rbeldessi, Aug 26, 2019.

  1. rbeldessi

    rbeldessi

    Joined:
    Mar 7, 2015
    Posts:
    1
    Hi, I'm having a problem where most of the glyphs in the text of my Text Mesh Pro components (not TMProUGUI) aren't translating based on their parent's position correctly and I'm not exactly sure why. I'm wondering if maybe anyone has any insight.

    Basically I generate a bunch of text bubbles at runtime that contain a sprite background, and a Text Mesh Pro component. After creating my first set of text bubbles most of the glyphs don't follow their parent game object anymore. It's important to note that the ! and ' are all generated by the same Text Mesh Pro component so it's even more baffling that they manage to move correctly while all the letters stay behind.

    If I toggle the Text Mesh Pro component off and on then the positions reset to the correct place.

    To update the position of the text bubbles all I'm doing is setting the parent's transform to be equal to the player's position + a static offset.

    text_align.gif
     
  2. chaklim

    chaklim

    Joined:
    May 28, 2019
    Posts:
    1
    how to slove it, i got a problem similar like you, my text mesh object will change parent automatically, when its parent detach from other object
     
  3. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,596
    Any chance you could provide me with some simple Repro project of this?