Search Issue Tracker
By Design
Votes
1
Found in
2021.3.35f1
2022.3.21f1
2023.2.12f1
2023.3.0b9
Issue ID
UUM-65361
Regression
No
UIToolkit SVG image tint color is not rendered correctly when AddToClassList() function is used
Reproduction steps:
1. Open the attached “UIToolkitTransparencyIssue0.zip” project
2. Open the “SampleScene”
3. Enter the Play mode
4. Observe the Game view and exit the Play mode
5. Select “UIDocument” GameObject in the Hierarchy
6. Open the “NewBehaviourScript” from the Inspector
7. Comment the “_showHideElement1.AddToClassList(USS_CLASS_HIDE);" line
8. Save and enter the Play mode
9. Observe the Game view
Expected result: The SVG image is tinted on both occasions with an alpha of 50%
Actual result: Adding the AddToClassList() function breaks the tint color application and makes the image fully black
Reproducible with: 2021.3.35f1, 2022.3.21f1, 2023.2.12f1, 2023.3.0b9
Reproducible on: Windows 11, macOS 14.3.1 (M2 Pro) (User reported)
Not reproducible on: no other environment tested
Note:
- Also reproducible in the Player
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Warnings in the Bug Reporter window are cut off and not truncated when the Bug Reporter window is resized to its minimum size
- Color is incorrectly applied to objects when initialized with non-normalized parameters
- SerializationUtility.GetManagedReferencesWithMissingTypes() don't return null when “Prefab has missing SerializeReference Types“ warning banner is present
- Memory leak when VFX Graph is open and Camera has "Target Texture" enabled
- The Canvas component's warning box is missing an apostrophe when Additional Shader Channels is set to "Normal" and "Tangent" with Render Mode set to "Screen Space - Overlay"
Resolution Note:
The selector is using "opacity: 100;" when going back to opaque, but the value is expected to be between 0 and 1. So using "opacity: 1;" instead will fix the issue. Alternatively, you could use "opacity: initial;" to revert back to the default value.