Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Button with text shadows hides sprites in label text (Unity 2023.2.0 & 2023.3.0a14)

Discussion in 'UI Toolkit' started by Destruxion, Nov 19, 2023.

  1. Destruxion

    Destruxion

    Joined:
    Jun 5, 2019
    Posts:
    36
    Hey,

    I am using a Sprite Asset to show icons (rich text) in a button label. This works fine as long as I do not set Text Shadow Offset or Blur Radius to values other than zero.

    Text Shadow Offset & Blur Radius = 0

    upload_2023-11-19_18-41-1.png

    Text Shadow Offset.x = 1

    upload_2023-11-19_18-41-48.png

    This is the material Unity created with the Sprite Asset. Maybe text shadows mess up the clip rect in the sprite shader?

    upload_2023-11-19_18-44-56.png

    Is anyone else experiencing this? Is there a workaround?

    Cheers,
    Dirk
     
  2. HugoBD-Unity

    HugoBD-Unity

    Unity Technologies

    Joined:
    May 14, 2018
    Posts:
    476
    Hi @Destruxion! Thank a lot for bringing this up. It is a bug. Could you log the issue ? (See how to report a bug)

    In the meantime, you can use the built-in Icon property. It was added in 2023.2. CleanShot 2023-11-20 at 13.54.05@2x.png
     
    Mj-Kkaya and Destruxion like this.
  3. Destruxion

    Destruxion

    Joined:
    Jun 5, 2019
    Posts:
    36
    Thanks, I have logged a bug report.
     
    HugoBD-Unity likes this.