UI Toolkit - USS Selectors names changing to " * " at Unity restart

Hello hello!

I’ve got a small issue since some days now, and I don’t understand how nor why its happening. Here’s a screenshot:

Basically, in my USS code, the selectors names are still the same:
Example, for my buttons: “.01-basic”, “.01-basic:hover”, “.01-basic:focus”, etc.

But, when I close Unity and like open it again, or restart my pc, or whatever I do, all the selectors name inside my UI Toolkit page are changing to " * ".

What I’m doing at every new session, I just copy the right name inside my USS file and paste them again inside the UI Toolkit stylesheet, again, and again.

But if someone has a solution, or a potential idea to fix this, I’d be happy to know it.

Thank you for your time, and have a great day :innocent:

Ilario

Hi,
This is a problem with your selector names. Class names must start with an identifier, which cannot start with a digit, a double hyphen or a hyphen followed by a digit.
Unfortunately we dont currently produce any errors when they are invalid and fallback to *. We do plan to improve this and produce error messages in the future.

1 Like

Ooohh okay, thank you! It’s logic and totally understandable, I don’t know why I’ve forgotten that… I’ll change the names then, thank you again!

1 Like