Search Issue Tracker

Fixed in 6000.3.15f1

Fixed in 6000.6.0a5

Won't Fix in 6000.4.X

Votes

1

Found in

6000.0.69f1

6000.3.11f1

6000.4.0b11

6000.5.0a8

6000.6.0a1

Issue ID

UUM-140065

Regression

No

UI Toolkit color gradient not applying to Label text when Outline Width is set to more than 0

Text (ATG)

-

How to reproduce:

  1. Open the attached “IN-139035_unity-bug-project.zip” project
  2. Open the “SampleScene”
  3. In the Project Window press on the “UIDocument” GameObject
  4. Set the UI Document component’s Source Asset property field to “UxmlFoo”
  5. Open and observe Game view

Actual result: "With gradient and outline" Label text only has an outline
Expected result: "With gradient and outline" Label text has both an outline and the gradient

Reproducible with: 2023.1.0a1, 6000.0.72f1, 6000.3.13f1, 6000.4.2f1, 6000.5.0b3, 6000.6.0a2

Reproducible on: Windows 11, Ubuntu 24.4.04 LTS
Not reproducible on: No other environment tested

Workaround: Wrapping the element in a <color=></color> tag, f.e.:
<color=yellow><gradient="gradient-vertical">With gradient and outline</gradient></color>

Notes:
- “With gradient and outline” is parsed from: <gradient="gradient-vertical">With gradient and outline</gradient>
- Setting Outline Width > 0 in the UI Builder on the Label, in the Text section, causes the <gradient> rich text tag to not apply to the Label text
- If Outline Width set <= 0 then the gradient rich text applies to the Label text
- Reproducible in a build

 

Link to forum post: [https://discussions.unity.com/t/ui-toolkit-text-more-text-styling/1715066/3

  1. Resolution Note (fix version 6000.3.15f1):

    Fixed in 6000.3.15f1

  2. Resolution Note (fix version 6000.6.0a5):

    Fixed in 6000.3.15f1

  3. Resolution Note (6000.4.X):

    Thank you for reporting a bug to Unity.

    We have reviewed the issue carefully, and in this case, the team is unable to prioritize fixing this bug. There are a number of reasons we make this decision, including the impact and severity of the issue across our user and customer base, and the possibility that future plans may solve the problem in a different way, or that a workaround for the bug may be available.

    Today we will be closing this case. Thank you again for taking the time to report this issue, and please let us know if there is anything else that changes the impact or severity of this issue.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.