Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug UIBuilder broke after updating to the latest version - 0.11.0

Discussion in 'UI Toolkit' started by Kan15hkSMT, May 6, 2020.

  1. Kan15hkSMT

    Kan15hkSMT

    Joined:
    Nov 13, 2019
    Posts:
    37
    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?

    Screen Shot 2020-05-06 at 3.02.14 PM.png
     
  2. stan-osipov

    stan-osipov

    Unity Technologies

    Joined:
    Feb 24, 2020
    Posts:
    31
    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!
     
  3. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,203
    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.
     
  4. Kan15hkSMT

    Kan15hkSMT

    Joined:
    Nov 13, 2019
    Posts:
    37
    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.
     
  5. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,203
    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.
     
    Kan15hkSMT likes this.
  6. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,203
    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.