Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Official UI Toolkit Update - Q3 2022

Discussion in 'UI Toolkit' started by benoitd_unity, Aug 29, 2022.

  1. benoitd_unity

    benoitd_unity

    Unity Technologies

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

    It has been a while since we reached out with an updated message about a general overview of the UI Toolkit’s direction.

    The landscape of UI systems at Unity

    First of all, we want to reiterate our commitment to make UI Toolkit the singular UI solution in the Unity product. This is a long term aspiration but we still firmly believe in this direction.

    We are in a continuous process to find and document parity gaps and assign the most intelligent priorities in our roadmap. Our insights come from conversations with internal stakeholders and customers, and of course from this little corner of the Unity forums.

    We are aware that UI Toolkit is not yet capable of fully replacing IMGUI and UGUI, but we are getting there. In this post we will talk about what we have been working on for Unity 2022, what to expect in Unity 2023 and what will be coming only in future releases.

    As a side note, we have updated this comparison page in our User Manual as a guide through the process of choosing which UI system to use or start a project with:
    https://docs.unity3d.com/2022.1/Documentation/Manual/UI-system-compare.html

    This page will be updated for each Unity version.

    UI Toolkit improvements in Unity 2022

    In Unity 2022, we have made leaps forward in closing the gap between what can be achieved with IMGUI for Editor UI. UI Toolkit is now in a better position to receive wider adoption both inside and outside Unity:
    • The Inspector Window now uses UI Toolkit to generate default Inspectors while falling back on IMGUI only for existing IMGUI PropertyDrawer and Editor implementations
    • All the main Unity attribute and type PropertyDrawers have been ported to UI Toolkit
    • The ListView now supports the same features as the IMGUI ReorderableList
    • We have added the TreeView and MultiColumnTreeView controls
    • We have added new Vector drawing APIs for programmatic shape rendering
    • We have improved the documentation by adding more topics about the UI Toolkit feature set as well as explaining the migration path from IMGUI
    We have also improved the performance of the core systems. Many of these improvements benefit the Editor use case as well as the Runtime UI use case:
    • Layout and styles
      • Lower overhead from GeometryChangedEvent
      • Updating styles on an element should no longer cause unnecessary invalidations of the layout or geometry
    • Rendering
      • Turning the USS styles of a VisualElement into a mesh is now faster, expected gain is in the order of 10x
      • Usage Hints are now set automatically when using USS Transitions, leading to better performance when animating VisualElement styles
      • Font textures are now bound through one of multiple textures slots from the UI shader (instead of a single one before) which means it’s possible to achieve a lower number of draw calls
    With these improvements, UI Toolkit becomes the recommended solution for making extensions to the Unity Editor.

    Plan of intent for 2023

    Our goal for 2023 is to improve the efficiency of UI Toolkit, both in terms of performance and workflows.

    The data binding feature set is currently limited and not very easy to use. We are hard at work on a generic data binding workflow for both Editor and Runtime UI. This system is built on top of the Unity.Properties system, which is being promoted to core Unity. Once the core of this workflow is in place, we are going to review the current SerializedProperty-only binding system and improve how it will be supported alongside the more generic one.

    Also in spite of our performance improvements in Unity 2022, UI Toolkit still imposes a high initialization cost for even moderately complex UI. We are in a situation where it is very difficult to extract more CPU performance from the current C# implementation of UI Toolkit core systems. There will therefore be a more fundamental shift in the UI Toolkit implementation which we intend to make an order of magnitude faster. This will apply to the performance of core features that are CPU intensive, such as processing layout changes and style changes, computing transforms and preparing the geometry of a VisualElement.

    Lastly, we want to dedicate some time to improving the UI Builder. Because it plays such an important role in a majority of workflows, and based on a lot of the feedback we received, we will review the architecture of the UI Builder in order to improve its level of stability and extensibility, and to make it easier for us to add new features to it down the line.

    Under this general direction, we hope to provide a robust foundation that allows us to evolve UI Toolkit in a sustainable way, as well as improving the experience of using it for both tools and game UI developers.

    Stay connected
    As always, keep sharing feedback, asking questions and reporting issues so we can build a better UI solution for you. Also, remember to visit our Unity platform public roadmap to engage with us and submit new ideas.

    Cheers,
     
  2. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    421
    Great news! Looking forward to seeing all the new stuff coming up.
    Just as a request on the comparison page: Could you make it alternate background color? It became a bit difficult to see which went to what value in the rows :p
     
    Ruchir and pokelocos like this.
  3. fg_davevanegdom

    fg_davevanegdom

    Joined:
    Sep 9, 2021
    Posts:
    9
  4. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    331
    Good call - I'll bring it up to the documentation team. Thanks!
     
    Hertzole likes this.
  5. Zephus

    Zephus

    Joined:
    May 25, 2015
    Posts:
    356
    So this is going to come out as way meaner as it's supposed to, but I'm genuinely confused and want to understand the current situation. I'm really wondering why the development on this is so slow. Are you running into problems with the underlying engine? Are you understaffed? I mean, I've read that you're planning to start working on the in-game UI in 2023 again, and that will probably take years to be at parity with uGUI. What is the estimated time of release? 2024? 2025? 2030? By the time there's supposed to be a working version of this the technology will be outdated again. Smaller teams will have released 2, 3 or even 4 entire games before the system will be production ready. Unreal Engine 6 with photorealistic graphics that run at half the processing power will probably be here. How can this be?

    As far as I know UI Toolkit has already been in development for years at this point. If you gave me the task to develop a modern successor to uGUI on my own, I'd probably give you a timeframe of about 1 year max until full release. While I'm probably extremely wrong on this, I'd be kind of disappointed in myself if I didn't manage to do that. How can the development cycle on this with a full team be twice or even three times the length of the development of an entire game?

    I really want a new UI solution, but at the rate development is going this will never be production-ready. Just imagine if it takes until 2025 for this to be at LTS status, which is probably an optimistic estimate. By then we'll be three years older, a new generation of consoles will probably be on the horizon, and we're just then getting an UI system that has been in the works for 8 (?) years. UI Toolkit will be outdated the minute it is released and you could pretty much start working on an entirely new system again right away.

    I really don't want to come off as an asshole, but development just needs to speed up. By a lot. There shouldn't be a plan to get back to in-game UI in 2023, but the plan should be to have parity for both editor and game UI by the end of 2022. I would love to understand what exactly is taking so long. We're waiting months for an update and then the updates are a few things most developers would probably have been able to do solo in a week. I don't see how a project like this takes more than a year in total to get into maintanance mode. As I said - small indie studios develop 30 hour long games in like 2 years. But developing a UI solution somehow takes more than 5. I just don't get it and I'm afraid that we'll never get out of this cycle of deprecating packages and developing new solutions that take so long to come out that they're oudated by the time they do.

    I realize how this post sounds, but I want you to know that, as a user, I'm getting really frustrated, and have observed the same sentiment with my colleagues. We're just waiting and waiting and waiting and nothing is happening. At this point I'm not even sure I'll be alive by the time UI Toolkit comes out. But I'd love to finally replace uGUI. I don't know if this post helps in any way, but maybe it at least gives you some insight into how your users might perceive the pace of development. I'm sure there are various issues that I have absolutely no idea about and that's fair. But in the end all I'm seeing is the package in the package manager and I want to desperately get away from uGUI, but I just can't. So I'm still holding my breath that UI Toolkit becomes available before I lose my mind trying to design something nice with uGUI.

    Thank you for reading my rant and I'm sorry if I offended anybody.
     
  6. TheOtherMonarch

    TheOtherMonarch

    Joined:
    Jul 28, 2012
    Posts:
    862
    What is Mask clipping in the system compare list? Do I need to wait for that before I can make round buttons? I have no experience with UI Toolkit.
     
  7. magnetic_scho

    magnetic_scho

    Joined:
    Feb 2, 2020
    Posts:
    92
    You can do round buttons already. You can also do masking (see https://forum.unity.com/threads/hp-bars-at-runtime-image-masking-or-fill.1076486/), but not based on e.g. transparency values of a png.
    Hope that answers your question!
     
  8. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    771
    Don't be sorry! Posts like this are helpful. As any company Unity needs to balance investment between different areas and the community can influence what gets the most attention. So thanks for that. We understand and acknowledge your frustration.

    Something I wanted to clarify that when we are saying "2023", we're talking about Unity version 2023. The development for 2022 is already over internally at Unity, it will be just in stabilization mode until 2022 LTS releases. Which means that new feature development is already focused on Unity 2023.

    To get to your main point, all I can do is offer some perspective about why it takes more time than you would imagine.

    First of all, UI Toolkit is already released since version 2019. It is used extensively for building Editor Workflows which comes with quite a few unique requirements compared to game UI. As you can imagine we have to maintain and support the existing feature set. A sizeable share of time goes towards this. As mentioned in the first post, replacing IMGUI is also our goal - and this is a huge effort.
    Since version 2021 it's also possible to use UI Toolkit for game UI. For your needs, it may not need be ready to replace UGUI but some users have started to adopt it. Which further increases the amount of support required.

    On top of that, I'd make the claim that building a UI system on top of Unity is a different story than building a UI System for Unity. Our velocity is nowhere near as a fast as some individual/team working on a UI system in an external environment. What I mean is that contributing to Unity comes with a bunch of practices that you simply don't have to care about when you're outside of our organization. It's not that this will necessarily lead to a better outcome - it's just the overhead of working in a large organization on a large scale codebase/product.

    Finally, I don't think using game development timelines as a comparison is entirely fair. We deliver a framework that can be used in different contexts with many different possibilities for things to go wrong. We spend a lot of time designing, documenting and maintaining APIs for the long term. Having worked in the games industry I don't think these are concerns in a game production.

    Again I understand your frustration. We feel it too. We would like to get there faster. Please trust that your goals are aligned with ours and that any time there is an opportunity to go there "faster", we'll take it.
     
  9. Doomchecker

    Doomchecker

    Joined:
    Apr 5, 2021
    Posts:
    109
    Hey,
    would you mind clarify something for me please.

    Are Editor tools created with UI toolkit in 2021 LTS fully functional in future versions?
    Also, are tools created in later versions fully backward compatible to 2021?

    So is the package "seperate" and shared between Unity versions?

    Thanks!
     
  10. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    There is no "package" (anymore). UI Toolkit, UI Builder, and runtime support are all part of core Unity. For the brief period where UI Toolkit was also in a separate package, specifically for Editor UI, it was always a mirror of what was in core Unity (it just gave you the option to override the module in core Unity). Even in 2021, you should not be using the package for creating Editor UI.

    So regarding your questions around forward/backward compatibility, you can assume the same rules apply to UI Toolkit public APIs and asset formats as all other public APIs and asset formats. Generally, nothing should break moving to a newer version, but move from 2022 back to 2021 is not guaranteed to work (2022 will have newer features not in 2021).
     
    GDevTeam, mariandev and Doomchecker like this.
  11. WellMOR_Q

    WellMOR_Q

    Joined:
    Dec 30, 2020
    Posts:
    3
    Still no support for custom shaders? :(
     
  12. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,085
    Hey, just wanted to say I'm unable to use UI Toolkit runtime without worldspace support :/
     
  13. Jorhoto

    Jorhoto

    Joined:
    May 7, 2019
    Posts:
    99
    Where ideally we would get it all in a single tool, at least, we can combine UI Toolkit features with UIGui to get worldspace and custom shaders.
     
  14. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    827
    But at the same time, any changes made to the package version that enable custom features, like:
    • custom ui builder editor for your custom components
    • play sound uss property on set or remove (this means things like playing a sound on :hover)
    • force render VisualElement to RenderTexture so I can drag and drop the element without a care in the world.
    These and some other things I've changed on the package version but can't remember right now or using internals access are not possible on the 'core' version of UI Toolkit, so I don't see any reason for me to ever update.
     
  15. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,085
    +1 editable source access is better for everyone.

    Some points made by Unity dev in comparison to NuGet (compiled code packages):
     
  16. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    If you rename enough namespaces and APIs, you might be able to continue to use the Runtime package in newer versions of Unity. But it's a stretch.

    Main reason to update is to get new features, fixes, and workflow improvements. And while it may not be as seemless or extensive, you can still customize the behaviour of UI Toolkit quite a lot without the need to edit source code.

    Those points do not apply as nicely to a core Engine (and Editor) dependency like a UI framework. The reason we went back into the core product is because much of the Engine/Editor has a dependency on UI. Our current package ecosystem does not support this setup. While we did have a package/core duality for a little bit, this was not sustainable in terms of support burden and stability/quality.

    Furthermore, the way the package worked to override the built-in UI module (used by the Editor itself), meant that you could crash/break the whole Editor if you changed package source code in a way that broke public (and sometimes internal) APIs. So it wasn't a very nice experience even when it was a package with source code.

    We'll get back to a world of packages some day. But we have to wait until we break up the monolithic Editor a bit more. UI Toolkit tried to be a package too soon.
     
    GDevTeam likes this.
  17. DavidNLN

    DavidNLN

    Joined:
    Sep 27, 2018
    Posts:
    90
    Would love to see some of the more basic issues solved before new features

    • Exposing some internal properties, for example Node `OnConnect` and `OnDisconnect` as well as the `DefaultEdgeConnectorListener`, cant understand why these are internal and private
    • InspectorElement just plainly not working - the accepted solution right now is to use a
      IMGUIContainer with an Editor
    • Image not supporting any kind of binding, why?
    • Lack of z-index support - I know this is technically a feature but it feels like a bug as it requires really weird workarounds for simple stuff like tabs and drag&drop functionality
     
  18. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,085
    I see but let's be honest the longer runtime part of UI Toolkit isn't decoupled from code required by the editor the tougher it will be to do in the feature. Maybe it wasn't "too soon" but something wrong with the architecture to begin with.

    Anyway that's the past that can't be changed. Hopefully Unity understands how important source access is. Unfortunately "some day" doesn't sound very promising.
     
    Last edited: Sep 19, 2022
  19. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    These are GraphView APIs. GraphView never got out of the experimental/unsupported stage. It's being kept alive for now because it's used by ShaderGraph (and other internal products) but there are no plans to make any non-bug-fix improvements. That said, there's a dedicated team working on a replacement for GraphView that will be released as a proper graph UI framework. No ETA on that yet though.

    2022 LTS (or 2022.2 if you open to betas/non-LTS) has a lot of improvements and fixes around nested InspectorElements. I recommend a look if you get the chance.

    Image has always been an odd element. It goes a bit against UI styles driving layout and instead has the content (the image) driving the layout. Unless you're making an image editor of some sort, it's recommended to set the size of your VisualElement "images" from USS or from C# (which could still read the dimensions from the image asset first).

    Don't get me wrong, I don't think it was good to introduce the Image element and then leave it untouched for so long. I'm just adding some context on why this controls has not seen a lot of updates. Could change in the future.

    We are aware. It will come. It's slowly making its way up the backlog.
     
    GDevTeam and ModLunar like this.
  20. marcospgp

    marcospgp

    Joined:
    Jun 11, 2018
    Posts:
    194
    Hey all, thanks for your work on UI Toolkit. Here's a bit of feedback - why is there no care put into the default look for custom inspectors?

    Here is an image taken from this page of the documentation:



    Why is there no padding at all?
    Shouldn't the UI look nice by default?
     
  21. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    Are you just talking about lack of padding to the left of the T in the first label? Everything else looks default (ie. same as IMGUI) to me.

    For the Toggle, it assumes you have more than one control. The checkbox is far into the middle of the screen so that it's aligned with other fields. But yes, if you only have a single Toggle, it does indeed look a bit odd.
     
    marcospgp likes this.
  22. dlorre

    dlorre

    Joined:
    Apr 12, 2020
    Posts:
    699
    As I see it UI Toolkit was originally designed for Keyboard & Mouse only and adding Gamepad is not so obvious. For example it accepts by default Left Stick+Right Stick+D Pad for navigation which is an overkill, so most users will have to change the default settings.

    The other big issue I have encountered with UI Toolkit is working with the ratio (various screen sizes), specially when fonts are involved. Something like css vh and vw units and calc() would be greatly appreciated.
     
  23. marcospgp

    marcospgp

    Joined:
    Jun 11, 2018
    Posts:
    194
    I see, I wasn't aware that keeping the exact same look as IMGUI was a constraint. Although the padding on the left might be less than what I'm used to seeing with the legacy UI.

    Perhaps it could be considered to include a default stylesheet for new UIs that makes things look a little more spaced out by default.
     
  24. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    The more Editor UI we transition to UI Toolkit, the easier it will be to make this improvements. That said, it should be easier now to make any style adjustments for your own UI. For example, if you just want more padding around your window, you can put all your content inside a VisualElement (container) and give it some padding.
     
    marcospgp likes this.
  25. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    We're actively working on both of these areas. As we transition back to focusing on runtime UI, these areas should see more priority.
     
  26. DavidNLN

    DavidNLN

    Joined:
    Sep 27, 2018
    Posts:
    90
    @uDamian That's great to hear, I've also struggled with adjusting the UI to different resolutions, any idea for when is this planned? as it does not even show on the road map under "in consideration"
     
  27. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    I don't know at this time when this will be prioritized. As for not being in the roadmap, not everything in our backlog is in the public roadmap. One way to make it more public would be to submit this as feedback yourself. We are using the submitted roadmap feedback more and more to help us prioritize work so every input helps.
     
  28. rosco_y

    rosco_y

    Joined:
    Aug 3, 2016
    Posts:
    92
    round_buttons.png
    You can make round cornered buttons by setting the "radius" of the borders.
     
    TheOtherMonarch likes this.
  29. ModLunar

    ModLunar

    Joined:
    Oct 16, 2016
    Posts:
    374
    Thanks a lot for responding directly to @Zephus 's concerns!

    This actually is really helpful for me to know as a developer moving forward. I tried to use UI Toolkit perhaps a year or two ago, and came across some issues trying to reach feature parity with my UI that was built with the Unity 4.6 UI system.
    (see my forum post here)

    Now I'm starting a new RPG project and am quite curious about taking another fresh look at UI Toolkit in Unity 2023 alpha and beyond. But your warnings about it being very challenging to engineer the UI system for Unity, being in a large scale codebase, etc. make a lot of sense.

    It kind of teaches/reminds me that I should be more understanding with the tool and its progress, and try to work with UI Toolkit rather than trying to force it to work in a way it wasn't built for.
    Goodluck to the people working on it, it seems like a massive task -- but I'm really happy with its benefits so far :)
     
    mariandev likes this.
  30. DS2-Donelan

    DS2-Donelan

    Joined:
    Oct 28, 2020
    Posts:
    13
    As someone who tried using UITK for runtime in preview and gave up -- but recently gave it another chance -- I think UI toolkit is shaping up very nicely and a lot of great improvements have been made so far.

    Are there any plans to support some missing css properties/values like display: inline-flex and gap?
     
    Aethenosity likes this.
  31. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,935
    Any plans for List View lazy loading/infinite scroll support so we can load the next 100 items once we reach the last item of the page
     
    nehvaleem and ModLunar like this.
  32. digiwombat

    digiwombat

    Joined:
    Sep 26, 2013
    Posts:
    48
    Hey! Thanks for the updates

    This is something I'd like to hear expounded on a little. It sounds very much like you're saying UI Toolkit is going to need/get a full rewrite, potentially in C++. Is that what's being said? Is that going to stop forward momentum of feature development as well?

    My concern is the same as we've seen on Visual Scripting and .NET/CoreCLR updates and DOTS and URP 2D features and a number of others. Unity seems to get a barebones, hard-to-use, feature-bare product out the door and just sort of stop dead on it for a lot of years for more ambitious, nebulous rewrites. Is that happening here? Or is this something with a strong plan for rewriting some minor core framework pieces?

    I'd love to hear more about the specifics if possible!
     
  33. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    771
    Hi,

    This is definitely along the lines of "a strong plan for rewriting some minor core framework pieces". We'll focus on a few core pieces with a high return on investment (for example, processing layout, computing USS styles, transform calculations, etc). Also worth mentioning that this can happen piecemeal over time so we're not talking something that will hold off all other development.
     
    mariandev, fxlange and digiwombat like this.
  34. niekdw96

    niekdw96

    Joined:
    Feb 11, 2020
    Posts:
    3
    I have been using UI toolkit for my project, and I love it. Of course it is not entirely feature complete yet. But definitely very usable.

    Coming from a web-development background. I found it very easy to write myself a little framework which allows me to use component based development. No need for looking up elements using the name. Each "module" which I call it, programmatically attaches elements to the nodes, and keeps references to them. So you can just loop through all attached components in the current module, and call functions on the controllers of those components. Very neat. Very much like how modern web-frameworks do it, like Angular/React/Vue.

    Personally, I never use the UI-builder tool. And never will. I don't think any web-developer who jumps into game-development will use the UI-builder tool. I honestly don't even see the point of it. Web-development has been done for years and years without such tools, without any problem. I would suggest to keep it as simple as possible, and work on usable features in the framework, instead of spending lots of resources on these tools that professional ui-developers wont use, because it will never give you as much control as just editing the files yourself (which is not more difficult than editing html/css/js).

    What I really hope, is that projects similar to Angular/React/Vue will pop up to build on top of UI Toolkit. Or maybe even better, make UI Toolkit similar to Angular/React/Vue. This will make it even easier for web-developers to jump into ui design for games.
     
    mitaywalle and ontrigger like this.
  35. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,085
    For someone not coming from web-development background it's completely opposite.
    Aren't there dozens of tools to make websites without using any code? That's a bit ignorant thinking that everyone making UI in Unity has to have professional web-developer knowledge.
     
  36. niekdw96

    niekdw96

    Joined:
    Feb 11, 2020
    Posts:
    3
    Yea you're right. People shouldn't have that experience in order to make UI in unity.
    And those tools do indeed exist. But they will often only allow you to make a certain type of website based on presets. Like a "online store", "blog", "forum" or "generic business website". Which is why those website builders are so easy to use. Its because they build very specific types of UI.

    For game UI, I don't believe this is the best choice. Since every game can have very different features, styles or animations which they want to put in their UI. So the UI builder ends up taking a lot of time to build for the Unity dev team, and incredibly complex to use for the developers. Because they try to make one tool that can make all UI.

    All while they could have also spend that time and effort on just making the UI framework more stable, feature complete, and easy to write code for.. Its what the professional UI developers will end up doing anyway.. to write the UI code manually, because the building tools will never do EVERYTHING exactly right. So why even try to make that at all.
     
  37. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,085
    No, UI builder is easier to use for someone without web-dev background.
    No, even some professional UI developers using Unity UI may have 0 experience with web-dev and instead are used to GameObjects and Prefabs.
    Or they can spend time making UI builder as easy to use as Unity UI. If that's not the case UI Toolkit will never replace it.

    One of Unity's main feature is easy of use not AAA abilities for professionals.
     
    Last edited: Oct 17, 2022
  38. useraccount1

    useraccount1

    Joined:
    Mar 31, 2018
    Posts:
    275
    I feel like UI builder is primarily made for someone that isn't a web developer or UI developer.

    Creating UI via UI Builder is easier and faster than trying to learn everything about CSS and XML. And non-technical peoples often want some custom piece of UI in the editor to work faster. UI Builder allows for one artist to put together desired effect.

    Also, I've found it is sometimes easier to prototype UIs in UI Builder than in tools like Figma. UI Builder still has a lot of issues and feels like an abandoned tool, but for me, UI Builder is one of the most important features compared to UGUI.
     
    hawaiian_lasagne and ModLunar like this.
  39. Xelnath

    Xelnath

    Joined:
    Jan 31, 2015
    Posts:
    402
    I've been able to do some really slick stuff with UI Toolkit in the UI Builder and relatively minimal code. Pretty impressed with the state of things after having left 3 years ago.

    Being able to visually see my USS changes in real time has been essential for non-technical users. (I'm an experienced engineer, but I can hand the UXML and USS over to an artist to make it look pretty without them needing to poke in code to make tweaks.)

    Strong agreement on your direction to improve performance issues.
    2022.10.22.SwitchbladeUI-Targets.gif
     
  40. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,631
    I used to be a web developer and I develop UIs.

    UI Toolkit's web obsession is an abomination.
     
  41. shanecelis

    shanecelis

    Joined:
    Mar 26, 2014
    Posts:
    22
    As a counter pointer, I use UI builder every day, and I love UIToolkit. I have used the IMGUI, Canvas, and UIToolkit is far and away a better experience. I'd say it's better than web development. It feels like what web development could have been if webdev's implementation language and scripting language had been the same. You can construct new elements kinds either by template, which is good; or code, which is better.

    There are things that I miss, of course, that I expect to show up one day. I'd dearly like to have
    :first-child
    and
    :last-child
    pseudo classes, but one can find workarounds if desperate.

    But there are other things, like a runtime drag-and-drop system that I don't expect Unity to provide. (Unity has a drag-and-drop for the editor, but it's really not what you want at runtime.) So I wrote a little runtime drag-and-drop system (MIT licensed).



    Anyway just wanted to share my enthusiasm for UIToolkit.
     
    Last edited: Oct 23, 2022
  42. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    429
  43. Fuzzypup

    Fuzzypup

    Joined:
    Aug 13, 2013
    Posts:
    190
    I like IMGUI makes UI for wargames very easy. I do not like the newer systems. Too complicated. I like coding my UI.
     
  44. ProtagonistKun

    ProtagonistKun

    Joined:
    Nov 26, 2015
    Posts:
    352
    Can we expect to see custom types for UxmlAttributes at some point? Would make authoring data with the help of custom data structures and ScriptableObjects possible, allowing for a great degree of flexible dynamic content.

    I saw the
    TypedUxmlAttributeDescription
    but the class on its own cannot be used.
     
    lilacsky824 and ModLunar like this.
  45. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    771
    Yes it is something we have in the works.
     
  46. MrSatzinger

    MrSatzinger

    Joined:
    Sep 15, 2022
    Posts:
    2
    I'm working on making a Drag and drop element for Unity. Here is the script, it will show up as a custom element in UI Builder. It doesn't "do" anything once you've done the drag but I'm working on that part next. There is a checkbox in the inspector that will tell the element to reset its position on drag or stay where you left it (it is check by defualt but doesn't display correctly in the UI builder inspector). You lose the element while dragging if it goes behind other elements so put it at the bottom of your visual tree. Also there are probably bugs I haven't found yet, but it's a start.

     

    Attached Files:

    ModLunar likes this.
  47. GameJing

    GameJing

    Joined:
    Nov 16, 2013
    Posts:
    3
    At the same time, using UI Toolkit, Jetpack Compose, Flutter, and UI Toolkit will take a lot of time, while Jetpack Compose and Flutter are more efficient and less difficult to learn. Looking forward to the Unity UI Toolkit becoming better to use.
     
    ModLunar likes this.
  48. tonytopper

    tonytopper

    Joined:
    Jun 25, 2018
    Posts:
    225
    Happy to hear this. This really was needed prior to today; glad it's getting prioritized. Seems like it should be better resourced within Unity, based on the pace of improvement.

    Separately, I would like to see UXML changes be part of live reloading.
     
  49. TheVirtualMunk

    TheVirtualMunk

    Joined:
    Sep 6, 2019
    Posts:
    150
    Please PLEASE don't forget XR and multi-pointer interactions. World space rendering is such a blocker for us, and from the roadmap UGUI doesn't seem to be getting the same love for accessibility (screenreaders, navigation) that UI Toolkit will get.
    Every serious XR application which will have a "flat-screen" equivalent experience and has strict accessibility requirements from industries will be left behind if this is not addressed.

    We will be forced to maintain and develop two different UI's or resort to third party solutions.

    Ref custom partly working UI toolkit world space solutions;
    https://www.reddit.com/r/Unity3D/comments/qh4fe4/here_is_a_script_to_use_uitoolkit_in_runtime/
    https://github.com/katas94/WorldSpace_UIToolkit_XR
     
    tonytopper likes this.
  50. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,085
    I have a question, I think I asked the same one also a year ago. Why is GameView toolbar still not updated to UI Toolkit? Here's Unity 2023.1 alpha and DoToolbarGUI eating 10ms(!!) of cpu...

    Same story with profiler:
     
    Last edited: Dec 21, 2022