Search Unity

TextMesh Pro TMP_Sprite_Animator - do I need it?

Discussion in 'UGUI & TextMesh Pro' started by yasirkula, May 19, 2018.

  1. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    Hi there,

    I've noticed that some of my Text Mesh Pro UGUI objects also have a TMP_Sprite_Animator component attached. I'm not using any sprites in any of these texts. Is it safe to remove the TMP_Sprite_Animator component? Also, I couldn't find any information about this component and was wondering its purpose.

    Thanks!
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The TMP_Sprite_Animator is added to a text object when a using the <sprite> tag with the anim attribute like <sprite="Name of Sprite Asset" anim="First frame Index, Last Frame Index, Framerate">

    It is safe to remove it from the text objects.

    Out of curiosity, are those prefabs that once used the sprite tag with the anim attribute? This component doesn't add itself on the text object unless this tag is used.
     
  3. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    That's a good question. Maybe I had copied patient zero from an example scene and then it spread across my project while getting duplicated. I can't really remember though.

    Regardless, thanks for the info! I've removed them from my texts.