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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Official Tell us about the UI Builder code preview panes

Discussion in 'UI Toolkit' started by benoitd_unity, Jan 27, 2023.

Thread Status:
Not open for further replies.
  1. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    327
    Hi folks,

    To improve the UI Builder's user experience, we're interested in how valuable the UXML and USS preview panes are when you're authoring UI. How frequently are you using them? How could they be improved?

    Thanks for sharing your feedback!

     
  2. RGVexed

    RGVexed

    Joined:
    Jul 14, 2015
    Posts:
    8
    Personally I would love to be able to edit them directly and have it update whats being displayed. As it stands now I don't even look at them. I'll open up the files in ide and edit them that way if need be. Syntax highlighting would also be grand.
     
  3. t2g4

    t2g4

    Joined:
    Nov 13, 2018
    Posts:
    46
    I'm working with UI Builder for about 2 months already, almost every day, and I see this for the first time. I just discovered that I can turn on the UXML/USS preview in UI Builder right now. And yes, it is absolutely useless for me.

    When I need any understanding of how it looks like under the hood I use UI Toolkit Debugger.
     
    benoitd_unity likes this.
  4. ErnestSurys

    ErnestSurys

    Joined:
    Jan 18, 2018
    Posts:
    82
    The buttons to open the file in the editor are handy for me. Besides that, I don't remember the time when I used them. I have much more problems with the StyleSheets and Hierarchy panes, they still feel unfinished.

    - I'm working with UI builder since it came out
    - Not a web developer
    - I never feel the need to modify UXML by hand
    - I often feel the need to modify USS by hand, as it feels faster sometimes
     
  5. PeppeJ2

    PeppeJ2

    Joined:
    May 13, 2014
    Posts:
    41
    Never used either preview. If I need to hand edit I open it in my IDE because it has all the text editing support I need.
     
    useraccount1 likes this.
  6. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    225
    Never used them.
     
  7. runner78

    runner78

    Joined:
    Mar 14, 2015
    Posts:
    760
    As it is now I also find it quite useless, if I want to see the code, I also want to edit it most of the time, so I switch to the IDE where there is code highlighting as well as the possibility to customize it. As a web developer, I'm used to writing styles manually anyway.
    However, it also needs a better IDE support from USS.

    To do this, however, the UIBuilder would have to be changed in such a way that the entire document is not rewritten when saving, but the changes are applied incrementally so that, for example, your own formatting and comment art are not removed.
     
    mariandev, ontrigger and MousePods like this.
  8. noirb

    noirb

    Joined:
    Apr 10, 2014
    Posts:
    84
    I never noticed them before, haha. That said, after playing around with them a bit I think I will continue to just have my IDE open in one window and the UI Builder in another. Particularly for the UXML preview I can't think of a time when I would want to see the generated UXML without editing it. For USS I'm less sure since sometimes the buttons/dropdowns for applying styles in the builder have slightly different labels from what is needed when writing USS, so having that as a reference could save a bit of trouble (the tooltips in the Builder also cover this info pretty well at the moment, though).

    It's quite comfortable to build the UXML hierarchy in the builder, assign IDs, classes, etc., and I pretty much only hand-edit the UXML when I need to add something which can't be done in the builder (e.g. we make heavy use of TwoPanelSplitView, but it cannot be created from within the Builder). This makes me think that in the future I may never need to look at UXML at all. USS, however, I am always editing myself in my IDE, except for the occasional in-line style applied either in the Builder or in code.
     
  9. imblue4d

    imblue4d

    Joined:
    May 27, 2016
    Posts:
    108
    About the same for me, when i need to edit the code i use a VSCode where i can set to recognize uxml as xml and uss as css, giving me syntax highlights & formatting.
    Plus i usally make use of IDE tools like search or bulk edit

    Would be very nice to be able to open them in the editor, like with "Script inspector 3" for example, but you'll need a whole another tool for that.
    So if you remove the previews, which are small even for showing the code sometimes, it wouldn't be a big deal to me.
     
  10. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    327
    What I'm hearing is in its current state, the code preview panes don't provide much value and you are relying on a code IDE to make manual changes when needed.

    Thank you folks for taking the time, much appreciated.
     
    RGVexed, KamilCSPS, Thimo_ and 4 others like this.
Thread Status:
Not open for further replies.