Theme style sheet loses reference to style sheets on rename/move of .uss => "Invalid Asset Path"

Unity 2022.2.0b16.112.5806

I have a "Theme Style Sheet" .tss asset and a "Style Sheet" .uss asset.
In the theme asset's Inspector there is a list of "Style Sheets" and a .uss style sheet asset is listed in there.

If I move, rename, or change the path to said .uss style sheet I'll get a warning "invalid asset path" in the console. Going back to the theme style sheet inspector it shows the style sheet asset as "(Missing Reference)".

NOTE: to see the broken reference in the theme you may have to unselect and select the theme style sheet . The Inspector won't refresh the dependencies list when it's currently visible.

Merely undoing the path or filename change of the .uss also won't make the .uss asset re-appear in the theme's list - the reference is lost due to the path to the referenced asset no longer valid. This shouldn't happen obviously. It requires selecting or dropping the referenced .uss file to the list again.

It reminds me of the early days of Assembly Definition Files, where they too did lose referenced dependencies when renaming an asmdef that was referenced. In both these cases there is (was) some sort of reliance on the asset's path.

No shizzle, this happens in 2021.3.15f1 too. :face_with_spiral_eyes:

Same behaviour with "Inherited Themes" and .tss files with one notable oddity: if the reference to a .tss file is lost, the theme will actually list a "missing reference" under Style Sheets rather than under Inherited Themes.

Hi CodeSmile,

Thanks for the detailed info. Even though it’s “known”, I think there is a lot of value in submitting a bug for this; I may not have a direct answer for you right now, as we are looking for different ways to address this, but I agree with you, this is a v1/early stages kind of bug that needs a solution. Reporting a bug externally will also ensure that the issue is treated with the correct priority. You can add both behaviors (including the missing reference oddity mentioned in your 3rd message) in the same bug. Thanks!

[quote=“sebastiend-unity”, post:4, topic: 902062]
it’s “known”
[/quote]
Is there a public issue tracker link available? Especially to get notifications.

I’ll see to it that I make a simple example project to submit a bug report. I always hesitate to use the Bug Reporter in actual projects simply because it’s taking so long (mostly compressing & upload the project).

Any news on a fix for this? It's a pretty annoying issue to work around. It's also surprising to me how the serialization was approached here which is the issue for all this. Usually references are serialized using guids but ThemeStyleSheets use the actual paths. What was the reason to use this approach instead of the guid approach like with most other files?