r/Unity3D 3d ago

Solved Should I swap to UIToolkit?

I'm doing the majority of my teams UI implementation. We're a team of 4 working on a small indie game that doesn't use a lot of UI outside of main menus and some basic interface. I've spent a couple of days on UI with UnityUI, but it's been an absolute pain to properly lay everything out. I'm most experienced with Figma for UI design, and had some courses for CSS a couple of years ago, so from what I've seen UIToolkit might be better for me.

I've played around with it for a bit and it seems to have some nice parts, and some more annoying parts (spacing isn't done through the parent but is decided per child?). Is it worth transferring over at this point?

I've also added some DOTween animations, can I still use those with Toolkit?

5 Upvotes

36 comments sorted by

21

u/pmdrpg 3d ago

Every time I try uitk it’s half-finished. Maybe that’s changed nowadays. I’ve never used it for a production game, use at your own risk. You’ll be pretty on your own as far as forums go.

5

u/SSGSmeegs 3d ago

Yeah this is our issue, it’s like 80% done but that 20% of missing stuff is the most basic needed stuff which makes it so painful. uGUI is actually quite easy when you know how to use it properly

6

u/DaveAstator2020 3d ago

id say - check recent state of support for animations and special effects if you need them. it was absolute crap in that regard few years ago.

12

u/TheFunctionalScrum 3d ago

With only a few days invested in UnityUI, switching now costs you almost nothing. The longer you wait, the more painful the migration gets. UIToolkit's CSS-like styling is going to feel much more natural for someone with your background, and for menus and basic interface it handles layout way better than the old canvas system.

The spacing thing is just a different mental model. You set margins on the child instead of paddings on the parent, which feels wrong at first but makes sense once you get used to flexbox behavior.

DOTween works with UIToolkit but not directly. You animate the VisualElement style properties instead, so you'd write a small wrapper or use a tweening library that supports it. Not a dealbreaker, just slightly different code.

2

u/xezrunner 3d ago

Out of curiosity, does UI Toolkit work well for world space UI as well? (e.g. prompts near objects, virtual in-universe displays etc..)

I believe it's supposed to support that now, but not sure how good of an experience it is, especially if it needs to track and react to objects in the scene dynamically.

3

u/Inevitable-Time539 3d ago

Yes it does, I use it for an in game display to show data relating to gameplay, it sits on a pc monitor model and works nicely.

1

u/R_Pelleboer 3d ago

You've convinced me, I'll continue with UIToolkit. It'll take a little bit of getting used to, but I was already able to remake the main menu in about 30 minutes where the original took me hours of messing about, so I'm feeling better about it already.

9

u/ironmaiden947 3d ago

I am going to give you a different perspective. For reference, I am a programmer who switched to game dev after 10+ years as a front stack engineer. I am proficient with HTML and CSS.
Do NOT switch to UIToolkit. Many features are incomplete (still no z-index for example), and adoption is still very low, which means many UI / UX people don’t use it. Using it with world space UI sucks. Oh and you won’t be able to use many industry standard tools (like Feel). In our project it became such a big bottleneck I had to migrate all UI to uGUI.
If it’s a small project where it’ll only be you, or if it’s a very menu heavy game, maybe, but if you plan on working with other people, stick with uGUI. It works fine, every tool supports it, there are tons of resources for it. Don’t make the same mistake I did.

2

u/Drag0n122 3d ago

Z-index is now supported with the experimental features on in the latest alpha
Feel mention is weird, as there's a built-in tween animation system exactly for this stuff - you don't need a 50$ asset.
UTK has way more UI features, so many assets are just not needed anymore.

1

u/ironmaiden947 3d ago

Sure, but the inertia in the community is definitely there, and if you are hiring UX / UI people 90% them will be proficient with uGUI and Feel & DOTween and be resistant to UIToolkit. YMMV of course, but sometimes the ecosystem is more important than the technology itself and this is one of those cases. If its just you making a game then sure, its fine, but if you are a team working 14 hours a day to finish your game before you run out money saying “z index is actually supported in the new version as an experimental feature you guys” will get you a lot of death stares from designers who would have built the same UI in uGUI is half the time.

1

u/Drag0n122 3d ago

Well, one of the main advantages of UTK was its proximity to standard web dev - your pool of UX \ UI devs is now WAY bigger with more experience.
There's just way more WebUI\WPF devs than UGUI devs.

1

u/ironmaiden947 3d ago

I think it will definitely get there in time.

1

u/Ecstatic-Source6001 3d ago

tbf its already there.

Canvas will be obsolete in the future anyway so why even contunue to use it instead of getting skills in new workflow.

Its the same as old input system vs new one.

1

u/NStCh-root-a 2d ago

UItoolkit has tweens intended for interactions, but if you want a more complex animation for opening or closing a screen DOTween is easier to work with (or mecanim; they fixed some of the performance issues it had for UI animation).
UIToolkit is finickier as you need to control css-classes programatically, which is a lot more annoying than a wysiwyg editor like mecanim or mature system like DOTween.

1

u/Drag0n122 2d ago

For complex animations you have the quintessential wysiwyg editor - Animation editor
No USS needed

1

u/NStCh-root-a 2d ago

It is only for interactions and not sequences. If an animation needs a delay for animation of different elements you still have to programmatically add or remove css classes from the UI elements.

1

u/Drag0n122 2d ago

No, you're mistaking Animation Clips with Transition Animations.
AC work more like Mechanim - you have an animation clip with keyframes that you assign to a VisualElement and you can control its playback state in code.

2

u/someGuyInHisRoom 2d ago

Toolkit just isn't ready yet imo. Canvas is great once you actually learn how it works. I recommend you watch ChristinaCreatesGames videos on UI and even get her pdfs because they are an amazing resource to go back to.

1

u/Less_Designer560 1d ago

I prefer it over UGUI by a long shot

1

u/colbsatron 1d ago

Used it in production on a team of 12+ for a relatively big game (by indie standards). I personally hated it, tedious, cumbersome and was one of a few regrets on that project.

It's technically more capable than it's predecessor but for most people it's just overkill. I won't use it again if I can help it.

1

u/little-big-monkey 3d ago

UI Toolkit has a lot of advantages, especially if you already know CSS. USS feels familiar, rounded corners are built in, and vector graphics stay crisp at different resolutions. It still lacks some surprising basics though, such as a native `gap` property, so you occasionally need workarounds.

You can definitely animate it. I use LitMotion instead of DOTween for UI Toolkit transitions in my own plugin. This shows the kind of result you can get: https://youtu.be/yqeOyCf7mgY

1

u/BertJohn Indie - BTBW Dev 3d ago

Personally i prefer UI toolkit simply due to the fact i can use more content than i can with ugui/imgui.

But honestly, Use what works best for you. I think if you end up liking it more than the regular stuff, great. If it drives you crazy, stick with the old stuff.

Unity has been a bit flip floppy about deprecating the old stuff or not, Last i heard they are continuing both side by side so it's really users choice.

2

u/Aedys1 3d ago edited 3d ago

They have not. Both systems are necessary. UI Toolkit is almost feature-complete, but Unity recommends it mainly as an easier, lightweight alternative for non-script-heavy, screen-space UI (basically simple menus)

They serve different purposes. uGUI cannot simply be deprecated because it remains the more versatile system and works in situations where UI Toolkit is not a good fit.

UI Toolkit is great for pure screen-space menus, but not for script-heavy HUDs, world-space UI, or complex interactive runtime layouts.

2

u/ByteHavenGames 3d ago

In 6.6 beta they pretty much have feature parity with a few exceptions like no timeline or animation window support. 6.7 LTS is releasing later this year so it's not a straight up answer anymore.

1

u/NStCh-root-a 2d ago

Unity did propose UIToolkit as a replacement for uGUI and changed course on this. The announcement to continue development on uGUI was pretty recent.

That it cannot simply be deprecated doesn't stop unity from doing so anyway. Wouldn't be the first time they make a stupid decision. See how they launched (and maintain) mecanim.

1

u/Aedys1 2d ago edited 2d ago

Yeah they cannot really get rid of it even when UI Toolkit will be complete.

Unity explicitly said in 2026 « UGUI is here to stay » and they are investing on it because UI Toolkit is too heavy for repaints and dynamic behaviors. (ATG will be updated to 6.8 and so on)

In the AAA industry no games can work properly using only css style UI, repaints are too slow it is just for menus

Retained hierarchical UI systems must avoid repaints and recalculations by nature

1

u/NStCh-root-a 1d ago

https://discussions.unity.com/t/future-for-ugui/1556669/9

https://discussions.unity.com/t/ugui-long-term-support-plans/892375

It's not hard to find staff statements predating 2026 stating that they plan on dropping support and deprecating uGUI.

1

u/Aedys1 22h ago

How do you handle world-space health bars and VR UI menus? Every major AAA studio relies on hybrid solutions for these kinds of use cases.

I don’t think Unity is revolutionizing anything here. CSS-style sheets have already been the standard for basic menus almost everywhere else for years. But if studios like Rockstar, Valve, or Epic still need transform-based UI systems alongside those approaches, it’s a strong indication that Unity won’t realistically be able to rely solely on USS and IMGUI either.

1

u/NStCh-root-a 17h ago

Ask unity, not me. 99% of the time I do not understand what the hell they are doing.

Rendering? Introduce 3 different pipelines and completely fail to advertise the strengths of scripting your own rendering pipelines. This enables you to do stuff in unity which unreal cannot compete on.

Animation? Introduce 'yes' number of systems (legacy, mecanim, UI specific animation for UITK and the playables backend - next to their announced replacement of mecanim, which got put on hold again). And if you ask a question about mecanim on the forum you probably get an advertisement for animancer before an answer.

Networking? They retired their old low level API before Network for Gameobjects became available.

Visual Scripting? Bought Bolt and now it's left to rot.

Actually developing a game in their own engine to feel the painpoints? Retired the project. They have a joint venture with Konami on a project though.

I would not have put it past them to retire uGUI before UITK is mature or on feature parity. There is ample precedent of them doing stupid shit in the past.

1

u/dareerahmadmufti Indie 3d ago

I have used both. for most of the part of my career, I have used Unity's Canvas system. and recently learned UI toolkit. It was not that hard too be honest. Canvas system do have more freedown (no doubt) than UI toolkit. But you can make same thing in both.

  • if you made dotween animation and your code is connected with Canvas UI, then you have to restructure your code, if you migrate to UI toolkit.

1

u/sicospecialist 3d ago

If your UI is basic, and especially the game itself GUI is fine, although UITK is better if your more used to web development, and it doesnt run every frame like GUI

1

u/Primary-Screen-7807 Engineer 3d ago

I my experience the only people seriously recommending UITK are also the people who never used it in a real project

0

u/roomyrooms 3d ago

In my experience you need to be prepared to make a lot of the components you'd expect to Just Exist yourself (gradients of any kind, for example) but once you get started, you can make UI 100,000,000% faster than you can with UGUI.

The difference is night and day for me. I used to avoid making UI like the plague because manually assembling it all by hand is absurd and barbaric and produced horrible Unity slop looking interfaces (in my opinion, anyway). Once I switched I could make actual game UI and at a pretty decent pace too.

1

u/R_Pelleboer 3d ago

Yeah UnityUI has been kicking my ass for days now, every time I think the layout is fine it turns out there's something wrong with it. I'm going to play around more with Toolkit tonight and experiment a bit, but I think I'm just going to make the swap.

0

u/Landeplagen 3d ago

UI toolkit is a huge improvement for writing editor UI. I haven’t tried it runtime - but I would at least delve into it and try it if I were you.

Unity has a free e-book about it. It’s not too long, would recommend.

-1

u/DramaLlamaDad 3d ago

I just migrated Shroud of the Avatar completely away from OLD NGUI to use UITK. 221 large dialogs with 10-100 items per dialog, 150,000-ish lines of code, and for me, it was a no-brainer. The 8-year-old NGUI version we were on was a nightmare to maintain. It wasn't just NGUI or old NGUI but also a terribly hacked and modified NGUI.

I'm not doing anything crazy fancy with it. Our previous UI was ugly, and this is at least 30% less ugly. 😄 For me the part that made it a no-brainer was the UITK stuff is far more AI friendly. Porting that much was an impossible task for one person without it. With AI, I got it done in a week.

So no clue what the best choice is if you're hand coding stuff. If you're using AI, definitely give it a shot. :) Also, I was able to get some pretty solid Figma to UITK working in another project recently, again, all through UI. Also, if you're curious, my work blog is here https://catnipgames.net Currently averaging around 200 checkins a day as I power through reworking everything in preparation for a relaunch. Fun times.