Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Text2DRenderer and LayerSorting

Discussion in 'Project Tiny' started by elroydolleman_unity, Jan 8, 2019.

  1. elroydolleman_unity

    elroydolleman_unity

    Joined:
    Dec 10, 2018
    Posts:
    13
    Can I change the layer/order of a Text2DRenderer so that it's in front of other things?

    It's possible with a Sprite2DRenderer, but there doesn't seem to be an option for that for a Text2DRenderer.
     
  2. vincismurf

    vincismurf

    Joined:
    Feb 28, 2013
    Posts:
    98
    Add LayerSorting Component
     
  3. elroydolleman_unity

    elroydolleman_unity

    Joined:
    Dec 10, 2018
    Posts:
    13
    Thanks for your reply. That component doesn't seem to work with a Text2DRenderer, only with a Sprite2DRenderer.
     
  4. vincismurf

    vincismurf

    Joined:
    Feb 28, 2013
    Posts:
    98
    It seems to work in my project
     
  5. elroydolleman_unity

    elroydolleman_unity

    Joined:
    Dec 10, 2018
    Posts:
    13
    This is how I have set up the entity:

    mytext.png

    The text is always behind sprites with an order above 0
     
  6. vincismurf

    vincismurf

    Joined:
    Feb 28, 2013
    Posts:
    98
    I'll take a look when I get home
     
  7. vincismurf

    vincismurf

    Joined:
    Feb 28, 2013
    Posts:
    98
    Here is mine. . . note this Entity is a child of the camera. . . so it moves with my player it is a workaround
     

    Attached Files:

    elroydolleman_unity likes this.
  8. elroydolleman_unity

    elroydolleman_unity

    Joined:
    Dec 10, 2018
    Posts:
    13
    It does work with the LayerSorting component now, not sure what I changed.
    It does not show it in the editor or in the game view, so that got me a bit confused.
     
    vincismurf likes this.