USS Variables Do not work for [SettingProvider]

Hello,

I assume that this is a bug. I am trying to use USS variables with a SettingsProvider. I have two USS variable files, one for the pro skin of the editor and another for the non-pro skin. These variables work fine with my editor window (which, OnEnable I poll the editor skin and add the correct StyleSheet to the rootelement).

However when I try to do the same in my [SettingsProvider] function the variable value is not applied.

Top: working variable value from EditorWindow
Button: non working variable
I have confirmed that the same USS file gets added to the sheets for each of the rootelements

USS:

:root {
    --foldout-titlebar-background-color: rgba(255, 255, 255,255);
}

I vaguely remember an issue with :root for inspector editors? Maybe this problem is related?

Is there a workaround I can use in the mean time?

Any help here would be much appreicated, Thanks!

This behaviour is described in docs: link

Where I’m sure that this may be the case here. I am not in an inspector window, I am in the project settings window. Maybe the docs need updating to reflect this

Hello, I have only just gotten around to looking into this again. I have found the best solution:

my uss var files selector is now this, rather than just the :root

:root,.settings-panel
1 Like