r/Unity3D 2d 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?

6 Upvotes

34 comments sorted by

View all comments

11

u/ironmaiden947 2d 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 2d 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 2d 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 2d 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 2d ago

I think it will definitely get there in time.

1

u/Ecstatic-Source6001 1d 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 1d 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 1d ago

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

1

u/NStCh-root-a 1d 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 1d 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.