Do you want to move to UI Toolkit for runtime UI?

Do you want to move to the new UI system or have you already, or do you hope to stay with UGUI as long as possible?!

I had a look at it and it is so different to UGUI (& NGUI before it) with the lack of monobehaviour referencing and grabbing controls by string name (?!) in code. I don’t think I can take the time or risk in moving to it until it is more fully completed for runtime. It has a resolution-less approach out of the box (though UGUI has assets to do similar) and it has theming/styling which is good, but the time in dev, the string lookup for referencing controls, the hugely different approach makes me cautious.

I’m using it and I’m happy with it, although I have some (extensive) web developer (distant) past, so there is some familiarity.

I’m currently working on a codegen solution for UI Toolkit where after editing an asset which referenced in a UI Document, will try to generate C# accessors for them through source generators, of course. Apparently I fell deep in this metaprogramming rabbit hole. :smile:
(This is not any kind of promise of any tool, just a reminder that you can remedy some stuff yourself in the matter of hours, especially if it’s about code generation and substituting string access).

1 Like

Yeah this may be a big one - I do not have web dev past!

It’s not!

I’ve never done any serious web dev, not in the strict sense, of course I used Wordpress and made a few template changes here and there so I had a basic understanding of the general concept behind CSS but generally I avoided getting into CSS/HTML as much as possible.

Moving to UI Toolkit was a breeze! So much so that you can find documentation and tutorials that are web-design specific and most of the time you can apply the CSS straight to USS. But again, I try to avoid USS altogether and just enjoy how much faster and more reasonable the API is to construct developer and basic game UI.

IMGUI … ugh. Like every time I thought I had grasped it, it gave me the finger and laughed at me, and did weird crap like not applying or serializing or undoing changes, or just being slow and brittle and never aligns perfectly with other controls.

It has always been and still is a dreadful struggle to build IMGUI interfaces, both runtime and editor.

Imagine, you can just now open UI Builder and drag & drop a decent scalable, flexible UI together in mere minutes! And when you have that, you grab those controls you need in code by string. I know, string referencing, right? But it’s a lot less bad or pervasive than I imagined. If you do it the best practice way, you only ever have one string in your code per control (type). If that ever changes, you just need to change it on the other side too.

Actually … that reminds me, I wanted to check if Rider is clever enough to do the rename refactoring of UI elements for me since it does so in a number of other ways you wouldn’t even bother to look for in Visual Studio.

2 Likes

I used to loathe any UI work when it came to uGUI. I found it such a slow process to work with, and the layout system still makes zero sense. Though at that point, as it was the first UI solution I’d used (lets ignore IMGUI) I thought I just hated UI work in general.

UI Toolkit has completely changed my stance around. I do enjoy UI work, I just don’t like uGUI. I’ve moved to UI Toolkit only on my latest project. Annoying that some packages have a dependency on uGIU so I can’t remove the package from my project…

I also have no web dev experience myself, too.

You definitely can’t approach UI Toolkit with the same mindset as uGUI. If you do that you’ll only be fighting against it. It really benefits from a model-view pattern approach.

It definitely has flaws and major shortcomings that are hopefully to be addressed in the near future (recent layoffs notwithstanding), along with some smaller things that need to be added/fixed. Even then, still so much better than uGUI IMHO.

4 Likes

I have a backend developer background. When I started with Unity game developing I first took a look at UGUI. And it was obvious that this is something that had been developed 20 years ago. No experienced business software developer today would use that voluntarily for developing an UI application. So I was very glad to find UIToolkit as a modern alternative. Yes, it has much in common with web development, but you dont need to be a web developer to use it. It was still very wise of Unity to orient itself towards something well-established. Like already mentioned here also UIToolkit has its issues and flaws especially having no runtime databinding. But here you can implement your own approach, if you like or simply use it without bindings.

https://discussions.unity.com/t/921903

1 Like

None of the above.

I could possibly see myself switching to UI Toolkit if Unity gets their shit together as a company, but not with its current feature set. UGUI is absolutely garbage, I’ve been saying this for ages, and I firmly believe that its only true place should be as a prototyping tool. I felt the exact same way about Unity’s GUI Elements thing and the only thing UGUI truly has over it is that it’s not as bad.

But…

UI Toolkit still lacks some critical features for me before I could possibly consider it viable for anything I work on. The biggest one is that it still lacks custom material support, something that people have been asking for since the thing was initially released for testing. I deal a lot with heavily stylized UI effects and the only way to do that with UI Toolkit involves a lot of really unstable hack jobs. The next biggest one is that there’s no support for world space UI, which further limits the amount of effects I can use it for.

UI Toolkit could be good but as it stands it’s just another Unity feature that’s being pushed as production ready while lacking key features.

7 Likes

UI Toolkit has too many missing features for me to use it for current game so its a no-go unfortunately.

10 Likes

You could use it if you don’t care about custom text effects and custom UI shaders. Data binding is available as of 2023.2 but it’s not terribly hard to implement something yourself, either.

NovaUI is also interesting and somewhat user friendlier than pure UI Toolkit. Nova | GUI Tools | Unity Asset Store It’s still UI toolkit based, however, so some limitations still apply such as no custom shaders and also custom transparency sort axis is not supported.

EDIT: Looks like Localization package support for UI Toolkit is only added in 2023.3+.

1 Like

I’m using it in my pet project (game) and I’m not happy. I didn’t have any experience in web development when I started using it though that wasn’t a problem. My main issues are:

  • stylizing UI takes a lot of time
  • no UI shaders, text effects, and particle effects
  • The css animation system is bad
  • performance issues (I’m still on 2021 LTS)
1 Like

Same, but I’m still stuck using UITK and I’m frustrated by it constantly though I’m at least able to make it cooperate which is more than can be said about UGUI.

That’s very close to my list. Just add an overall lack of masking (I refuse to use the vector graphics package as it’s experimental, lacks features, and is known to be slow), and remove the performance issues (it’s holding up so far on 2023.1) and animation issues (I haven’t reached that point yet).

Hmm it’s not clear from the asset store that it is based on UI toolkit. Not really obvious what it has underneath!

Yep and still very much in development for runtime so although ugui may seem a bit garbage, this (& ngui) are what I am used to so I can wait. Good to know there is some positivity over it though

I’m not jumping to an unfinished UI system with lacking performance, but that sure as hell doesn’t mean I’m hoping to stay with UGUI as long as possible. More like in lack of something decent that’s what we’re stuck with.

I’m too far into my current project to switch anyway. As for the next one, don’t even know if Unity will be the engine of choice.

3 Likes

GameDev Guide’s Matt is trying UI Toolkit, it’s not that interesting, only that how intuitive or not for him. So watching on 2x speed is recommended.

1 Like

no worldspace UI = no like

6 Likes

Same here. Working in VR and need worldspace, so it’s an automatic no go.

3 Likes

It’s not an animation system it’s a transition system and it’s good for for what it is doing.

It’s some type of hybrid, since they still use TextMeshPro for text.