Making UI for Games with UI Toolkit ~ Unity 2022 Beginner's Guide to UI

  Рет қаралды 30,177

Chris' Tutorials

Chris' Tutorials

Күн бұрын

Learn how to set up a UI built with UI toolkit for use during gameplay. This tutorial shows the creation of the UI document, basics of stylesheets styling, how to query UI visual elements, and how to create an event callback on button clicks with UI toolkit UIs. Video is meant to be a introductory guide for beginners.
Scripts and Assets ➣ / 76314316
➣ Downloadable Assets, Video Courses, and Other Places to Follow Me
/ christutorials
chris-tutorials.itch.io/
linktr.ee/ChrisTutorials
◢ Chris Recommends ◥
Master Skills with Skillshare Video Courses ►► www.skillshare.com/r/user/chr...
Save Money Shopping Online with Honey Extension ►► joinhoney.com/ref/qd04c25
00:00 - What to Expect
00:16 - Scene Setup
00:45 - Make UI Document
01:12 - UI Builder Window
02:10 - Making a Unity Stylesheet
03:21 - Stylesheet Class Targeting
04:51 - Show UI Document in Game
06:52 - Creating a Button Child UI Document
08:58 - Writing a Button Click Event Callback
13:24 - Wrapup

Пікірлер: 29
@RossYlitalo
@RossYlitalo Жыл бұрын
Thanks Chris! I really appreciate your practical, no-nonsense putting the "rubber on the road" approach to this new topic! I subscribed and I hope to see more from you!
@Iwanezp
@Iwanezp Жыл бұрын
Great tutorial, very simple but at the same time very clear as to how it works. I've spent a lot of time in web development and that system makes me feel like in home. Many thanks
@supersuper2
@supersuper2 Жыл бұрын
Excellent tutorial and overview! Unity UI in general seems like such a black box so am happy to see more content covering it. Would love to see more about how UI Toolkit links up to the code and ways of dynamically filling in UI content. Thanks so much!
@sebastienalbert6159
@sebastienalbert6159 Жыл бұрын
You don't need canvas AT ALL! The point is to replace UGui with UiToolkit...
@mybadstudios
@mybadstudios 11 ай бұрын
I was wondering that same thing. This is the first time I saw someone saying we need the canvas. Thanks for confirming my understanding of this system wasn't completely off :D
@minhmanle7521
@minhmanle7521 11 күн бұрын
For anyone having blank uss file after adding header, try Ctrl + S then open uss file again.
@happyfarang
@happyfarang Жыл бұрын
what do you need the canvas for? isn't the point of UI toolkit to not use the old canvas system? Or am I missing something vital?
@palanolho82
@palanolho82 7 ай бұрын
Was about to ask the same question. Any idea?
@YoutuberUser002
@YoutuberUser002 11 күн бұрын
​@@palanolho82yh none I think his brain farted
@AndreaMencancini
@AndreaMencancini 9 ай бұрын
beautiful!
@StefanVanderVyver
@StefanVanderVyver Жыл бұрын
Very nice tutorial. Thanks for taking the time to make it. At 10:56 where you try to get a grip on the Button element, I take it that the "obscure" code you are writing is because you cannot access the Button as a typical gameObject? So you have to go via the uiDocument?
@Entikai
@Entikai Жыл бұрын
Looks promising. I wish it was better integrated with the inspector. I wish button events were visible in the inspector and you could drag and drop scripts on to it, like the legacy buttons.
@YoutuberUser002
@YoutuberUser002 11 күн бұрын
That's an awful way of doing it you can't make UI prefabs or anything the old system is bad
@mesakun6858
@mesakun6858 Жыл бұрын
Video is out dated, 3:44 does not auto add anything at all... in unity 2021.3.9f1 personal cannot get past it & won't add the header to the empty list
@fuzzychest
@fuzzychest 7 ай бұрын
Thanks! This helped me get started. What I dont understand is why we have to create each element independently. For example the first button, why not create it in the MainUI? We should be able to add click/event handlers in the UI builder on the action elements like toggle, button, etc. Seems an odd design choice to do it the way you showed in the video. Unless I missed something? Which is likely, I am a unity noob.
@adminadmin2384
@adminadmin2384 Жыл бұрын
My UIToolkit menu only contains UIDocument as submenu. Even if I create a UIDocument, there are no further submenus. I also use 2022 Unity version. How do I get all the other submenus and how do I open the UIBuildEditor?
@ethan_zoller
@ethan_zoller 10 ай бұрын
Right click in the assets folder not the hierarchy window
@wormholeinteractive
@wormholeinteractive Жыл бұрын
Wait - can we make websites on Unity now???
@YoutuberUser002
@YoutuberUser002 11 күн бұрын
*use website based languages for creating user interfaces yes correct
@CSharpGameDev
@CSharpGameDev 11 ай бұрын
Idk if you'll get back to me but I'm using VS Code, installed a package that would support .uss files but when I open the file, nothing shows up. Just a blank page. Is that gonna affect anything or should I just manually type the classes in?
@YoutuberUser002
@YoutuberUser002 11 күн бұрын
The only extra extensions you need are html and CSS based extensions and yes it's empty because there no logic in there imagine it like a blank script you have to do all the logic yourself either by code or using the toolkit
@lucutes2936
@lucutes2936 3 ай бұрын
where is an UI example?
@SaschQuasch
@SaschQuasch 8 ай бұрын
Can i create in unity a gui for another game? I know the question is mind boggling. Hahaha!😂
@MasterM12345
@MasterM12345 Жыл бұрын
Why the heck do you have so many tabs open xD
@seanerer
@seanerer Жыл бұрын
Makes zero sense. 1. Why would you put the document in a canvas? 2. Why would you have a document within a document? The document is supposed to be like web development. So normally, one document per page would make more sense...
@martindubois9279
@martindubois9279 Жыл бұрын
i was about to say the same thing ... what the purpose of using ui toolkit without the performance ... the whole canvas refresh every time something change inside.
@ethan_zoller
@ethan_zoller 10 ай бұрын
I agree, the button should be housed inside the same document as the text. But, overall good tutorial.
@YoutuberUser002
@YoutuberUser002 11 күн бұрын
​@@martindubois9279not very bright are you
@martindubois9279
@martindubois9279 10 күн бұрын
@@KZfaqrUser002 i doubt about your intelligence with such comments ... only later think that they are more experiences than a 30 years old experienced guy ....
Instantiate UI Elements at Runtime - Unity 2022 UI Toolkit Tutorial
15:46
Building Runtime UI with UI Toolkit In Unity
21:35
Game Dev Guide
Рет қаралды 34 М.
小宇宙竟然尿裤子!#小丑#家庭#搞笑
00:26
家庭搞笑日记
Рет қаралды 9 МЛН
MISS CIRCLE STUDENTS BULLY ME!
00:12
Andreas Eskander
Рет қаралды 19 МЛН
Making UI That Looks Good In Unity
18:06
Game Dev Guide
Рет қаралды 665 М.
How To Make UIs without frustration | Unity Beginner Tutorial
16:58
This is GameDev
Рет қаралды 30 М.
Get started with UI Toolkit in Unity
12:29
Sasquatch B Studios
Рет қаралды 27 М.
What about UI Toolkit? - UI in Unity
11:02
One Wheel Studio
Рет қаралды 14 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 698 М.
The Apps I Use to Design Games
26:07
AdamCYounis
Рет қаралды 125 М.
Unity3D UI Toolkit Tutorial - Main Menu
29:30
Bunny Coding
Рет қаралды 17 М.
Build Procedural UI with Callbacks and Manipulators
28:14
git-amend
Рет қаралды 12 М.
И смех и грех 😂👍 #ржака #юмор
0:26
Васянькины истории
Рет қаралды 3,2 МЛН
Бабайка #юмор #рекомендации #прикол
0:32
МэдПринц 👑
Рет қаралды 2,5 МЛН