Get started with UI Toolkit in Unity

preview_player
Показать описание

--
If you've been intimidated to try UI Toolkit, or have been wondering if you should switch to it (or are just curious how to get started working with it) - then this video is perfect!
This video will show you everything you need to know to get started with menu building in Unity's UI Toolkit. I hope you enjoy!

--
Timestamps:

00:00 - intro
00:21 - setting up UI Toolkit in your hierarchy
01:25 - setting up our header
02:09 - creating a stylesheet
04:20 - setting up buttons and their stylesheets
05:33 - adding a background and new fonts
06:16 - assigning OnClick events to buttons
08:28 - assigning OnClick events to a List of buttons
09:43 - transition animations

--
UI Toolkit sample project (QuizU)

UI Toolkit sample project (Dragon Crashers):

UI Toolkit E-book

UI Toolkit Pseudo-classes

Easing Functions Reference:

---
---
---

Who We Are-------------------------------------

If you're new to our channel, we're Brandon & Nikki from Sasquatch B Studios. We sold our house to start our game studio, and work full time on building our business and making our game, Veil of Maia.

Don't forget to Subscribe for NEW game dev videos every Monday & Thursday!

Wishlist Samurado!

Follow us on Twitter for regular updates!

#unitytutorial #unity2d #unity3d
Рекомендации по теме
Комментарии
Автор

Great video. This is the best UIToolkit intro I've seen. And I now realize that CSS and its relatives will haunt me until the day I log off.

TheArghnono
Автор

Great tutorial! I didn't even know about the new UI system until now

SharpDressedBear
Автор

Each time I watch one of your tutorials, most of what you're saying actually sticks and makes sense. Watch, follow, and take notes. These tutorials will seriously level up your Game Dev Skills and understanding. Thank you brandon!

GameHeroStudio
Автор

Thanks! I basically managed to do a fully fledged basic menu with everything I needed just watching the video. As always super useful! We can perhaps avoid the casting "as Button>" by using the syntax: "Q<Button>("selector")"

MelMacaluso
Автор

Great tutorial, you're pleasingly fast yet explain everything in painstaking detail. I wouldn't mind seeing more and more advanced tutorials from you Brandon as you level up yourself, you're great at passing the knowledge on!

developerchannel
Автор

Nice! Do more of this UIToolkit please 🥺

edstamonica
Автор

I'm surprised you packed that all into such a short (haha "short") video. I've been hesitant to use UI Toolkit after seeing it used in the Happy Harvest, but this made it look really easy, especially when you use your own sprites and make use of the USS style sheets and transitions (that was SO cool for such little work). Great job again Brandon. Lovin the videos, hope you guys are making it with YouTube, you're killin it!

shockingchris
Автор

Thanks. This helped me a lot in moving from the legacy UI system to the UI toolkit.

mohammedadel
Автор

Thank you so much, such a great tutorial

petipois
Автор

Excellent info. Concise, informative, easy to digest ;-)

pocket-logic
Автор

Better then most tutorials out here!
Much Love from Sweden! <3

ahla
Автор

As someone who actually likes the Unity UI System, I think this is worse. Is it more intuitive... yes, does it have features I wish the UI System had... yes, but is it faster to make stuff... absolutely not. I love that I can create my menus and drag and drop events (even changing them in play mode without needing to recompile) and get everything set up in MERE MINUTES, and I don't see the UI Toolkit giving me that ability. Having to individually subscribe buttons to events feels odd, and also seems less efficient, since the UI System doesn't need to do that processing on Awake or Start, since the EventTrigger and OnClick() event already have that "baked" into them before the game even starts.

Great tutorial tho, I definitely learned a whole lot more (and faster) than fumbling around and trying to figure it out

rocco.uploads
Автор

Thanks a lot! I really hated making the UI with the default UI system. That won't be a problem anymore :)

tinalava
Автор

Just what I needed for a quick tech demo. Thanks!

sleepingcolossus
Автор

Just curious: why is it a good practice to unregister an event OnDisable when you registered it in Awake? Your button becomes unusable as soon as you disable the menu.

yaled
Автор

Whats the point having all buttons register to the same event?
Why is not a single ui toolkit video showing/explaining how to actually do ui and open and close new windows and popups (when pressing the options button for example).
No one does

VoodooDg
Автор

Another great tutorial. Very useful overview for helping decide whether you might want to use this feature or not. I had heard name name 'UI Toolkit', but that was about it. It looks like WPF and the way it uses XSLT. I have UI on my 3D objects, and it looks like Unity still recommends uGUI for that. But this might make sense for the menu. Another complicated new system to learn, and I still haven't gotten the hang of thew new input system yet.

MarcWithaC-BlenderAndGameDev
Автор

Is UI Toolkit only for Screen Space Overlay? Aren't there any way to use for World Space?

mutlugameofhalit
Автор

Are magic strings the only way to interact with the ui builder via c#?

depre
Автор

How do you get the UIDocument to render the UI in the sceneview? Even if I start up a new project and follow these steps, the UI only renders in the Game/Simulator view for me. In the Scene view, it's invisible... I also checked to make sure that the UI layer is visible, and scene view is on. Furthermore, I'm using the UnityDefaultRuntimeTheme for my panel settings. Why doesn't it show up?!

sorenschultz