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
- The "Install Packages" button misses tooltips that would explain its behaviors
- Adding "Color" Element in UI Builder breaks Color Picker
- UI Builder Viewport is rendered in solid black and ArgumentOutOfRangeException is thrown when zooming in
- Game view renders yellow color when using RenderTexture.autoGenerateMips with DX12
- The "Multiplayer Widgets" package is displayed as an option for the installation even though it is already installed
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.