Unity Issue Tracker - Selector override rules for user styles are ignored when used from themes
Open
UUM-108227
Selector override rules for user styles are ignored when used from themes
Unity: UI Toolkit Controls
Open
6.7.X
6.6.X
6.5.X
6.4.X
6.3.X
6.0.X
Won't Fix
6.2.X
6.1.X
Unity 6000.2 has reached its end of life and will not receive further updates. If you need additional fixes, please upgrade to a newer Unity version.
6000.1 is no longer a supported version of Unity. Please see corresponding 6000.2 port instead (if applicable)
Steps to reproduce:
Import the attached "CustomThemeSelectorRuleIssue.unitypackage" into any project
Select Test->StyleSheetButton-Editor menu to show an editor window
Notice the red button and hover/click on it, it keeps its red background
Open the "ButtonStyledTheme" scene
Enter playmode
Hover on all 3 buttons
Actual results: Not all buttons are red, especially when hovered
Expected results: All buttons should be red, when hovered and clicked.
Reproducible with versions:
Not reproducible with versions:
Can’t test with versions:
Tested on (OS): Windows editor
Notes:
Something fishy is going on. Changing the PanelSettings of one of the UIDocuments in the scene might affect the styling on the other documents. My gut tells me the style cache might be to blame here
Prioritise and Follow this issue
Have a workaround or additional info about this issue?