Search Unity

Bug SpirteAsset won't render in front even with DistanceFieldOverlay

Discussion in 'UGUI & TextMesh Pro' started by xjjon, Dec 18, 2022.

  1. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    612
    Hi, I am using sprite asset to display some icons in my World TextMeshPro component:

    "<sprite=3> MyText"

    To get this text to always render in front of other objects in the scene, I am using the Mobile/Distance Field Overlay as suggested in this thread.

    upload_2022-12-18_20-45-8.png

    It works for normal text but the sprite asset will not render in front.

    To show an example:

    upload_2022-12-18_20-43-58.png

    When I adjust the 'y' value so the text is in front of the mesh:

    upload_2022-12-18_20-44-29.png

    The shield icon appears then. So only the sprite is not rendering in front.

    Is this a bug or I am doing something wrong? Thanks