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
- Editor crash on "PPtr<Shader>::operator Shader*() const" when checking in changes with a very long comment in Unity Version Control window
- [Ubuntu] Toolbar and menu items for Version Control lack spaces in text on Linux
- Unity Version Control window Pending Changes tab’s Item checkbox is unresponsive when clicked and the item list is empty
- Audio stuttering occurs when heavy processing is performed while OnAudioFilterRead is in use
- Inconsistent Node search results in VFX Graph
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.