Search Unity

TextMesh Pro Render text behind a sprite

Discussion in 'Unity UI & TextMesh Pro' started by DarkSlash, Jan 11, 2019.

  1. DarkSlash

    DarkSlash

    Joined:
    Sep 30, 2011
    Posts:
    109
    I have a text that I want to put behind a sprite, and then move it to show it. But The text always renders on top of the sprite, no matter where I move it on the Hierarchy panel. I tried to access the Renderer or the MeshRenderer, as some solutions suggests, but I get an error saying that the object has not that component attached.
    What Im doing wrong?
     
  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    2,269
    Are you using the Canvas system with a <TextMeshProUGUI> component or using the normal <TextMeshPro> component?

    Is this sprite defined in the text string or is the sprite a parent of the text object?