I downloaded the newest version of UI builder mainly because I wanted to use the Multi-USS Support.
Once I added 3 files to the StyleSheets pane and made some USS & UXML edits from code editor the UI Builder became unresponsive.
Then I quit Unity and tried to start it again and what I get is the screenshot attached below. I tried multiple times to open the UIBuilder window again but nothing happened.
I tried to downgrade the UIBuilder, reset my commits and various other things to get rid of this floating empty panel and get UIBuilder to show up but nothing worked.
Any recommendations on how to fix this because I need the UIBuilder to make all of the UI for my app?
Thank you for the report!
As the quick fix remove the Library folder so you can use the project again. But before you do this, can you please share a project with us (including Library folder) ?
Thank you!
Please also post or send us your Unity Console errors.
In general, the UI Builder tries to restore the last open document when you re-open the Builder, even when restarting Unity itself. If there were errors with the UXML or USS assets that caused the initial UI Builder bugs, it’s possible the UI Builder will immediately go back to this bad state when relaunching Unity. If you encounter this state, please post here or send us a bug report, but to get unstuck, you can always try deleting the Library/UIBuilder
folder in your project. No need to delete the entire Library folder.
I tried deleting the Library folder but the error still shows up. I was trying to learn how to use USS variables to store color and maybe that caused errors in the USS as my syntax might be wrong. I had to delete and clone my entire project again to get rid of it. I do not get any console errors.
I made a test project with the same steps I took that causes this issue but it won’t let me upload it here because the file size is too large. If you can give me a link where I can upload the zip then I can share that test project with you.
Thanks.
UI Builder does not yet support variables. It should handle its lack of support for them more gracefully than it does but that’s very likely why it was not re-opening for you, even after a Library delete and Unity restart.
As I mentioned above, UI Builder will reload the previously loaded UXML/USS when you open it. If the UXML/USS is in a bad or unsupported state that the UI Builder does not handle gracefully, you’ll end up with these stuck states. We’ll work handling things more gracefully in future versions.
That said, I would recommend only deleting Library/UIBuilder
next time when run into something like this first, not the entire Library folder. I would also try switching to a simpler UXML/USS and make sure that works in your current project and UI Builder version before doing a re-clone of your entire project.
Last, please add back one variable in your USS and verify that you get back into the same broken state that you had when you started this thread. I’d like to validate that this was indeed the issue and there’s no deeper issue lurking.
And thank you for the support in this development stage of the UI Builder. 1.0 is not far now and should provide a more stable base going forward.
1 Like
UI Builder 0.11.1-preview should no longer get into the loop of reloading an invalid USS when you start Unity and give you the right indication of what went wrong. As for the actual invalid state, Variables support in the UI Builder is coming soon.