I’m was messing about UIBuilder and just created a simple screen with a single a textfield on it at an absolute position and the text bolded. I saved it to UXML and USS files as prompted and then went to look at what was generated.
from C#, there is an API (AddStyleSheet iirc) that you can use after you load the asset.
from UI builder, I think is planned (but you can manually edit the xml to include the style)
As M_R mentioned, there is no support yet to (re)use an existing StyleSheet via the UI Builder. However, if you do change the path in the UXML tag (for at least the first root element) and reopen the UI Builder with the modified UXML file, the Builder will correctly use the existing StyleSheet going forward. It’s just the initial setup which is not supported yet. And yes, we do have plans to fix this soon.
I tried to load the style by editing the UXML and it works fine in my test panel, but I’m still not seeing the style applied in the UI Builder. Is this a bug I should submit?
The UI Builder currently does not refresh after external file changes. It’s a known problem. You should see the styles applied if you File>New and reload your UXML in the Builder (closing and reopening the Builder window is not enough)