UI Toolkit Primer - Build UIs like a Programmer

  Рет қаралды 47,427

Tarodev

Tarodev

Күн бұрын

Building interfaces is now effortlessly simple with the powerful new UI Toolkit. I'll guide you through how I, as a programmer, construct these interfaces and walk you through the essential fundamentals of the UI Toolkit.
Dive deep into topics including styling with USS, animations, transitions, decoupled UI, and much more.
Girl scene project files: / tarodev
Source code: github.com/Matthew-J-Spencer/...
1-minute video on responsiveness: • Unity UI Toolkit Respo...
Assets used:
STYLIZED - Sci-Fi Corridor: bit.ly/3YRZHuj
Gamer Girl: bit.ly/3YRrA5D
❤️ Become a Tarobro on Patreon: / tarodev
=========
🔔 SUBSCRIBE: bit.ly/3eqG1Z6
🗨️ DISCORD: / discord
✅ MORE TUTORIALS: / tarodev
0:00 Showcasing UI Toolkit features
02:38 What we'll be building
03:00 Brief overview of the UI Builder
04:44 Brief overview of UXML
06:42 Building interfaces like a programmer
26:44 UI Toolkit animation

Пікірлер: 244
@maxfun6797
@maxfun6797 9 ай бұрын
Tarodev took a timemachine from the future back to this date just so he could keep his tutorial posting consistency for us. What a lad.
@Tarodev
@Tarodev 9 ай бұрын
Lol
@bakasan9424
@bakasan9424 9 ай бұрын
Man, tarodev's tutorials are the best. I like how he teach us an actual good way of doing things not like other game development channels....
@ZOMGbies
@ZOMGbies 9 ай бұрын
Yeah exactly, i've said the same thing elsewhere. Like, people with official Unity affiliation/partnership or whatever publish terrible tutorials because the content has no real world use or are horrifically non performant or unmanageable. You follow the others tutorial and yeah, it works, but its not until then that you realise its not something you can ever actually use. It's just a lesson on how not to do something most of the time. And even if you're not going to use a specific thing in Tarodev's vids, you will almost always learn something useful generally.
@felfurion8624
@felfurion8624 9 ай бұрын
Just like that - the most detailed, practical and in-depth tutorial on the new UI toolkit that exists. Yet again: thank you Tarodev
@Tarodev
@Tarodev 9 ай бұрын
As an alternative workflow to using OnValidate, you can do the following: 1. Create a script and name it 'MainMenuScreen', deriving from VisualElement. Add the following 'UxmlFactory' code to have it expose in the UI Builder (docs.unity3d.com/Manual/UIE-expose-custom-control-to-uxml.html). 2. Create a UIDocument file and drag your exposed MainMenuScreen control into the view. 3. Drag the UIDocument file into the source asset of the UIDocument component. Now your changes in MainMenuScreen script will reflect just as OnValidate would. Also, here's a 1-minute video about UI Toolkit responsiveness: kzbin.info/www/bejne/rpOolKyketN-gqs
@DaYooperDev
@DaYooperDev 9 ай бұрын
The link to the Unity docs accidentally had the right parenthesis included in the URL, removing that will take you to the proper page.
@DailyPass
@DailyPass 9 ай бұрын
Great tutorial! Was meaning to learn this and your thumbnail and showcase hooked me haha Easy to understand and follow keep up the great work 👍
@Tarodev
@Tarodev 9 ай бұрын
Clickbait successful.
@ZOMGbies
@ZOMGbies 9 ай бұрын
​@@Tarodev Saw your channel logo and thought I was getting some tasteful chibi hentai. Now I'm trying to code a game.
@toprogress
@toprogress 8 ай бұрын
This tutorial is so sweet to watch, I love the way you present the pro way to use UI-Toolkit and your confidence.
@dehinrsu
@dehinrsu 4 ай бұрын
Use UIDocument instead of programmatically. This video is completely defeating the purpose of UIDocuments. Separate, model view and presentation, which are c#, uxml and uss respectively here…
@dragone427
@dragone427 9 ай бұрын
I had a hard time creating an UI for a project using only C#. Thanks so much for this tutorial, it will help me a lot!
@captainnoyaux
@captainnoyaux 9 ай бұрын
and when the world needed him the most ... he returned !!! Thanks for that video I'll consume it later !
@nielsbrons
@nielsbrons 7 ай бұрын
Thank you so much for this. I've been going through the official documentation but couldnt really wrap my head around it. This showed me everything I needed to know. Thanks
@lemonlimebitta8903
@lemonlimebitta8903 8 ай бұрын
oh man taro delivers just when I needed it!
@frankreiser_recaremo
@frankreiser_recaremo 8 ай бұрын
Amazing - this is the way to do it like a pro. Hope you will continue the tutorials with UI Toolkit.
@cedrica.3178
@cedrica.3178 9 ай бұрын
Perfect timing, I needed a good tutorial on this for a project. You're a savior.
@thr1sn0sp0on
@thr1sn0sp0on 9 ай бұрын
Thank you! Awesome jump start video 🙏
@hanya-chan454
@hanya-chan454 9 ай бұрын
i was littrely thinking of making new UI to my game and u posted this vid lol, thanks a lot!
@RossYlitalo
@RossYlitalo 3 ай бұрын
Very cool tutorial--also it was fun watching you zip through this stuff.
@smokinglife8980
@smokinglife8980 9 ай бұрын
Great Video! Might have been a bit fast paste but there is a pause and rewind button for a reason (: I've been needing to learn UI Toolkit for a while now and saw you posted this. I was board and said whelp lets do this! So thanks for getting me to finally learn this it was great and this is so much better than old UI lol, Have a great day or night man!
@amazeinggames
@amazeinggames 3 ай бұрын
*fast paced
@IdeaToGame
@IdeaToGame 9 ай бұрын
Best class on this topic so far! It's been pretty hard to find more about UI Toolkit, mainly in Custom Editor Windows, so thank you very much for this video.
@Tarodev
@Tarodev 9 ай бұрын
You're most welcome and I'm glad you enjoyed 🙂
@bazeragi
@bazeragi 6 ай бұрын
Amazing video! thanks!!
@MrLachlan21
@MrLachlan21 9 ай бұрын
Mate, I know jack all about this stuff. But listening to your clear and coherent explanations of what you're doing and why, makes it a really easy listen while learning something that I'm sure many people are looking to learn. Thanks for the awesome vids.
@Tarodev
@Tarodev 9 ай бұрын
I appreciate the kind words mate 😊 thanks for watching even when you didn't need it ❤️
@SojoTaku
@SojoTaku 9 ай бұрын
I am a simple man, I see gamer girl in thumbnail, I click Noice tut tho!!
@iDigvijaysinhG
@iDigvijaysinhG 9 ай бұрын
Cool, finally this video will push me to transition to UI toolkit. Amazing video as always
@tudorelRo
@tudorelRo 9 ай бұрын
Great video as always, I have been very interested in this package since it was announced but mostly for Editor use. Even tho I do find it very useful for editor UI, I do think it's a bit weird to use for runtime UI (at least in its current state). And from what I could find the recommended way for runtime UI is still Unity UI (I would have left a link to the page but it seems like I cant let a comment with a link inside it) at least for the moment.
@Director414
@Director414 9 ай бұрын
Amazing video, as always! Been hesitant to use the UI Toolkit, but now I might give it a try! :) P.S. For the sake of the video tutorial, I find co-pilot to be annoying. It's hard to follow when blocks of code just pops up. Way easier to follow when you write+say what you are writing. Just a tip from a filmmaker and fellow coder! Keep up the great work! Cheers! 🍻☺
@karimkimsanbaev7932
@karimkimsanbaev7932 5 ай бұрын
Great awesome video tutorial!
@1Chitus
@1Chitus 8 ай бұрын
I enjoy using the UI toolkit, but there have been some parts that felt a bit unclear to me. I really appreciate that you've covered most of them.
@steveradtke1308
@steveradtke1308 9 ай бұрын
Keep up the good work my man.
@yufisjr
@yufisjr 9 ай бұрын
Thanks for the new video Sifu! :)
@DanDarger
@DanDarger 9 ай бұрын
Brilliant as always. Thanks Taro! Does the tweening support easing functions? Also is there an equivalent of scss?
@corviraptor
@corviraptor 9 ай бұрын
Thank you for showing off this workflow! The "recommended" workflow is honestly unbelievably bad for larger scale projects but I resigned myself to using it before seeing this and realizing I could just write extensions and factory methods to make building UI through C# much more readable.
@michaellee1610
@michaellee1610 8 ай бұрын
This is the best tutorial for unity's UI toolkit on the entire internet
@jahoopyjaheepu497
@jahoopyjaheepu497 3 ай бұрын
excellent tutorial, thank you so much!
@Tarodev
@Tarodev 3 ай бұрын
No... Thank you
@alaslipknot
@alaslipknot 9 ай бұрын
on a more serious note, If unity adds a "standard apps" Update loop (things are not re-drawn every frame) then it can be a very powerful non-game apps tool.
@LuukDomhof
@LuukDomhof 9 ай бұрын
Unity actually already is a very powerful non-game tool, especially if you're doing anything like simulation or visualization. If you'd like to manually control update cycles for your scripts you could already use FixedUpdate, though often times an event pattern is more robust for those kinds of applications. Anything that you'd be simulating would probably have to be updated every frame anyway.
@alaslipknot
@alaslipknot 9 ай бұрын
Am not talking about script updates, am talking about frame re-draws. Also. yes for anything that require 3D or simulation, unity is great for non-games apps, but imagine doing something as simple as a " calendar app" (yes, why use unity for that) but let's supposed its a very typical calendar app, but it has a total different scene where you can see super cool 3D achievements. For the achievement scene, the way unity render things make total sense (re-draw every frame) But for the Calendar part, a more traditional way is crucial, otherwise you will have a Calendar app that drains battery with the same rate as a Game, which is unacceptable. Godot for example offer a solution where the UI only ger re-drawn if a change happens. if you open the youtube app and stay in the homescreen for 2 hours without anything moving (not even video previews) it will consume less battery than opening a unity mobile game with only one single sprite in the scene.
@ohyonghao
@ohyonghao 3 ай бұрын
Thank you so much for the great explanation of why you are doing things. I was watching another video of someone making a healthbar and he just told you what to do but nothing about why he was doing that.
@Tarodev
@Tarodev 3 ай бұрын
Glad you liked the format 😊
@stevenrodkiss473
@stevenrodkiss473 7 ай бұрын
"Copilot is inside my head" Tarodev (Aug 30, 2023) Love it.
@Tarodev
@Tarodev 7 ай бұрын
It scares me sometimes
@Foxyzier
@Foxyzier 9 ай бұрын
I love using the ui toolkit but some parts have been kinda shady for me, love that you have covered most of them
@hegworks
@hegworks 9 ай бұрын
great video man, hella useful!
@jubinjajoria2870
@jubinjajoria2870 9 ай бұрын
Damn... That's a really great in-depth tutorial.
@criadabatterista8647
@criadabatterista8647 7 ай бұрын
Nice brief tutorial about basic use of the UI toolkit! I have question tho, does the UI adjust dynamically with the device resolutions? says I want to develop for androids and pc, do I have to adjust the stylesheet for each device resolutions?
@TedThomasTT
@TedThomasTT 9 ай бұрын
Another banger tutorial 🍻
@jonathanthompson8741
@jonathanthompson8741 9 ай бұрын
This just earned a subscribe from me. Very awesome tutorial.
@ewwitsantonio
@ewwitsantonio 9 ай бұрын
a NEW Tarodev video?? woooo!
@CornuDev
@CornuDev 9 ай бұрын
Wow, I would like to try this.
@FakeMelon
@FakeMelon 9 ай бұрын
Your tutorials are so good man. straight to the point. love it!
@TilDrill
@TilDrill 4 ай бұрын
Thanks! This was very helpful, but is there a way to add hover logic on there? Like playing a sound on hover or something? button.hover isnt possible
@stashatstake
@stashatstake 9 ай бұрын
Thank you for this, Taro
@petpumpkin
@petpumpkin 9 ай бұрын
One thing that's kinda got me stuck, the documentation isn't that clear. How do we add our own fonts and set them in the .uss files?
@Ricochetaglet
@Ricochetaglet 8 ай бұрын
I don't know what's happening, yet. But I'm here for it!
@Tarodev
@Tarodev 8 ай бұрын
Oh and what exactly brought you in, Rico? The thirst for knowledge?
@diligencehumility6971
@diligencehumility6971 9 ай бұрын
Nice video. How would you do drag-and-drop in this UI framework?
@aeliusdawn
@aeliusdawn 8 ай бұрын
Another easy way to have it update in edit mode is to create a button in the editor with the Generate() method. If you have OdinInspector it's really easy, just add [Button] over it.
@nerdin8or
@nerdin8or 9 ай бұрын
As a frontend web developer in my professional life, this makes so much more sense to me. Now we’ll see if I can figure out a way to make reusable components like React in the Unity Toolkit. I’d be unstoppable. Thank you so much for the tutorial, this helped immensely! My biggest blocker was figuring out a better way to add functionality than the way their sample project does it, with a million string ID queries.
@Tarodev
@Tarodev 9 ай бұрын
Reusable components is a cakewalk! Checkout my Tarodev repo on git. I also built a scss/less/stylus -> uss compiler plugin.
@adamodimattia
@adamodimattia 2 ай бұрын
Awesome stuff, great tutorial, I was worried whether UI Toolkit can do any tweening animations.
@MarkusDev
@MarkusDev 7 ай бұрын
@Tarodev I have a question about hierachy when using this building technique. Lets say I have some containers on my root (canvas). Now I would like to add more visual elements to a specific container but using a different script. For example a container shows several info like the inventory or data from players. So when I try to instantiate other scripts on a certain container refering to this container as root is not that simple. And another issue is that the container needs to be instantiated first. I hope thats not too confusing. Thank you!
@Zicore47
@Zicore47 8 ай бұрын
Cool introduction. I really hope Unity figures out databindings at runtime soon, that would solve a lot of magic string issues.
@DimaChebanov
@DimaChebanov 9 ай бұрын
What do you think about using the UI Toolkit with the MVVM architecture pattern? The UI Toolkit is most suitable for this purpose, and you can easily separate the data presentation logic (Views or UI) from the core business logic part of the application, for example using the UnityMvvmToolkit package.
@Tarodev
@Tarodev 9 ай бұрын
Well, the workflow I show here is all about building interfaces as a programmer. It assumes you're not working in a team on the ui. Using the typical workflow of ui (with the builder), mvvm could work nicely.
@NadjibBait
@NadjibBait 6 ай бұрын
@@Tarodev Yes MVVM works better with declarative UIs/XML based interfaces (Microsoft's XAML, Android's AXML or in this case Unity's UXML), and everything is glued with Data Binding. What you did in this video is close to MVU (without the state management/U part). I'm really thinking about creating a full MVU implementation for UI Toolkit for my next project, where it'll be really easy to build UI and manage state, something like: readonly State clickCount = 1; readonly State text = "Hello World"; private void Generate() { Body = () => new VisualElement { new Text (text, "text-title"), new Button("Update Text", "btn-primary", () => text .Value = $"Click Count: {clickCount.Value++}") }; I already made a POC and it works very good, it even works really well with Unity Hot Reload package for now. I intend to share it with the community when I finish it and if it turns out good.
@pocket-logic1154
@pocket-logic1154 9 ай бұрын
Yet another extremely useful video! Thank you! I'm curious, though - is there any specific reason(s) why you prefer Rider over VS? I did try out their 30 day trial, and it's a great IDE, but wasn't really sure it was worth paying for. If Unity and Windows is all I'm ever using it with, would you say that it's worth switching from VS to Rider?
@s3104029
@s3104029 9 ай бұрын
Yeah! I have the same question. Also I am facing the problem that my Visual Studio Community 2022 doesn't really recognize Unity USS file. For example if I type 'color', it doesn't show me selection list (red, white, black, etc).
@KalimistDev
@KalimistDev 9 ай бұрын
Great video!. 5:47 How do you enable the autocomplete/suggestion in Rider? i only see that in VSCode but not in Rider.
@Tarodev
@Tarodev 9 ай бұрын
Rider has a copilot plugin :) Works beautifully.
@xDarkxTriviumx
@xDarkxTriviumx 9 ай бұрын
Perfect introduction into UIToolkit. Guess I have no excuse for avoiding switching from Canvas now xD
@ZOMGbies
@ZOMGbies 9 ай бұрын
I'd recommend downloading the Unity demo 'Dragon Crashers' just to see a completed UI and test whether you have performance issues using it. Saw an older video on UIT showing a lot of lag. My PC seems ok with it but YMMV
@TrapStream
@TrapStream 9 ай бұрын
Could you please explain how to set up the .uss file extension to work in VS Code? I see that it works in Rider from above video.
@truth8483
@truth8483 9 ай бұрын
Hey Taro, managed to make the ui work, i actually converted the variables set up in the coroutine as private variables in the script so i could access them and update them at runtime by events for things like healthbar and manabar for the player. Seems to work well now. Undortunatelt dowsnt seem like we can use this fkr worldspace ui though so healthbars over monsters isnt easy or possible to do for now.
@andrewalexart
@andrewalexart 9 ай бұрын
UI toolkit looks very interesting, but I tried it and I guess it's updating very often that I can't rely on it yet
@restushlogic5794
@restushlogic5794 9 ай бұрын
This is awesome, thanks for the tutorial, I never know that UI Toolkit had tween. I would like to move completely to UI Toolkit but DOTween don't have shortcut to tween UI Toolkit. Also world UI seems need to use render texture when using UI Toolkit 😢
@Shonia
@Shonia 9 ай бұрын
Big return!
@chessersstudios1778
@chessersstudios1778 9 ай бұрын
tardev back with the thristy thumbnails
@RudolfsLab
@RudolfsLab 5 ай бұрын
This is a godsend
@alaaabusarah9568
@alaaabusarah9568 9 ай бұрын
It's cool make a editor UI with it 🔥
@Mavzu132
@Mavzu132 2 ай бұрын
How is your changes reflected on the editor after you change the code. I need to re focus on the unity editor and need a asset refresh.
@HunterSchramm
@HunterSchramm 9 ай бұрын
HE'S BACK
@Tharky
@Tharky 9 ай бұрын
I'm here for Taropoints.
@Tarodev
@Tarodev 9 ай бұрын
1 taropoint has been allocated to your account
@ZOMGbies
@ZOMGbies 9 ай бұрын
o_o'@@Tarodev
@Tarodev
@Tarodev 9 ай бұрын
@@ZOMGbies One point for you too!
@kadircalloglu2848
@kadircalloglu2848 9 ай бұрын
It's a nice tutorial, but I'm wondering ,we're doing too many string-type assignments here like "red-boy", wouldn't they be a problem in terms of performance?
@Obscurely
@Obscurely 8 ай бұрын
Upon leveraging a coroutine for the Generate function my build now has about a half second delay from when the game scene starts and when the U is constructed. This results in an very noticeable and ugly "flash" in which the U suddenly appears. How do you go about eliminating this lag? I removed the coroutine part and just check if the root is null before continuing with the rest of the generate function. Some debugging revealed that the root was only ever null coming from the OnValidate part, but it never happened to me (so far) when invoked from Start. While I'm sure that a coroutine would be nice for some deferred UI rendering logic I'm not so sure it's defacto-best practice with this particular UI generation style.
@attckDog
@attckDog 9 ай бұрын
I'm here for the hot wifus and I suppose also the good unity tips ;)
@aeliusdawn
@aeliusdawn 9 ай бұрын
Great tutorial! The number 1 thing that I really want to know is how to make the UI scale like the canvas do. You know, make it scale uniformly on either the X Or Y Axis, instead of just stretching to the screen. I have looked everywhere and not found anything on it yet.
@Tarodev
@Tarodev 9 ай бұрын
Ui documents use a shared asset file called 'panel settings', which is created for you when you add your first ui document. In there you can control how it scales. It even gives you a slider which let's you favor height or width when scaling 😊
@jeffmccloud905
@jeffmccloud905 9 ай бұрын
@Tarodev - I wonder if you've tried ReactUnity ? (I have not yet, but it looks good - it uses JS/React to render UI Toolkit components. Perfect for an existing React dev)
@xanderlinhares
@xanderlinhares 9 ай бұрын
I remember it being impossible to write custom shaders with UI Toolkit which was enough of a negative to go back to UGUI. Is this still the case?
@thygrrr
@thygrrr 9 ай бұрын
Why are there dashes before the var --border-width ?
@lizkimber
@lizkimber 3 ай бұрын
I havent looked at UI toolkit for ages, so i found myself here, but one thing i will say, your comment on copilot is spot on.. its like having a twin whos you but you borg like share the thoughts
@epicmcdude
@epicmcdude 9 ай бұрын
Goddamn I JUST upgraded my project to 2022.3 and wondering how UI Toolkit works. thanks, man!
@ZOMGbies
@ZOMGbies 9 ай бұрын
UIT currently in a weird place btw. It will be a properly supported feature in Unity 2023 LTS I understand. But not touched until then.
@senzubeamz
@senzubeamz 8 ай бұрын
I always thought treating unity UI like it's web is a great idea, now it's reality!
@AIGameMonster
@AIGameMonster 4 ай бұрын
How to change the size of Tab Icon in TabView in Unity 2023.2.0f1? I am having a problem using Unity UI Toolkit. I don't know how to change the size of the Tab icon. I searched for relevant materials and documentation, but I couldn't find any. I need help, thank you!
@syntaaxfps
@syntaaxfps 9 ай бұрын
U did really good in the 5devs video haha
@Tarodev
@Tarodev 9 ай бұрын
Which one? I've done a few now 😅
@syntaaxfps
@syntaaxfps 9 ай бұрын
@@Tarodev every time u were there haha
@nikoleovu
@nikoleovu 9 ай бұрын
Have you completely stopped using the old UI management in favor of using UI Toolkit? Is there anything in the old way that UI Toolkit lacks? Also thanks for another great tutorial. All your videos are really informative and well put together
@Tarodev
@Tarodev 9 ай бұрын
Ui toolkit takes longer to setup, so if I just need to put text on a screen for a video, I'll use the old system. For an actual game though, I'll use ui toolkit. Although a few caveats... Shaders are not supported for another year at least. World canvases are also not supported right now.
@mikedavies4237
@mikedavies4237 5 ай бұрын
I am clearly missing something here, I have jumped ahead to the 'good way' and followed along, however I get no UI when running the game. Maybe there is something that gets set up using the 'bad way' that the 'good way' depends upon. I mean, where is the camera set up for this?
@violon212
@violon212 6 ай бұрын
i dont really get how i can make the ui look good, am i stuck with the rendering of the ui how can i use custum icon for buttons and stuff? or even the slider. it looks bad, is there a way to have an artist stylized it?
@bangliu9650
@bangliu9650 8 ай бұрын
How can we change the cube in the project file back to a character 3d prefab, with animation?
@Tarodev
@Tarodev 8 ай бұрын
Message me on patreon :)
@jesserowan9808
@jesserowan9808 4 ай бұрын
How did you get Rider to recognize USS files? I'm getting inspector errors on things like the :root selector, using %, etc
@Tarodev
@Tarodev 4 ай бұрын
I had to ignore those warnings. I actually submitted a ticket to rider suggesting a few uss improvements, so we will see how it goes
@timurradman3999
@timurradman3999 9 ай бұрын
Feels bad that I have been working on my game's UI for 2 weeks just to see an easier way to do it :,) I was reading about Layout Groups and how expensive they are when it comes to performance, and this looks like the best way to have control over a flow of elements within a container in a performant way
@ZOMGbies
@ZOMGbies 9 ай бұрын
Same here, kind of. Had an OK UGUI. Disabled it in favour of UIT... Tried for 2 days, gave up. Tried UGUI again for a day.... then Tarodev comes along and now I'm back on UIT. :| Annnnnnnd nothing's progressed in 5 days now.
@ProfessionalJason
@ProfessionalJason 5 ай бұрын
Can you direct me to a resource which explains why when you add "scale" to your button style class, it animates the value? Mine does not animate.
@Tarodev
@Tarodev 5 ай бұрын
Ensure you have a transition property. .thing{ transition: all 0.5s ease-in-out-sine; scale: 1; } .thing:hover{ scale: 1.5; }
@muhammadfurqan105
@muhammadfurqan105 9 ай бұрын
Out of curiosity: Is it efficient to do this all by code, then drag-and-drop? (for like AAA games) Can we make in-game HUD with this? And if possible can you make a tutorial for full fledge menu system and HUD like Cyberpunk 2077 👉👈🥺
@avalacos
@avalacos 9 ай бұрын
Can you use this new UI toolkit to create world space UI?
@ZOMGbies
@ZOMGbies 9 ай бұрын
HA! You've been building up to this video in some capacity for like 9mths+ haven't you? A day or two ago, I saw a comment from you elsewhere on YT vid about UIT, and you identified the issue with strings there. After a couple days of trying UIT I gave up on went back to UGUI because I couldn't get an image to scale uniformly with different resolutions. Maybe I was doing it wrong in hindsight. Or ascribed more functionality to UGUI than actually exists. But now that there's a *Tarodev* tutorial on it (and maybe more to come?) I guess I'll be giving it a second try.
@vitorfigueredo18
@vitorfigueredo18 9 ай бұрын
Hey, what about differente screen sizes, does it handle well?
@Tarodev
@Tarodev 9 ай бұрын
I'm talking to you right now on discord 😊 but for everyone else: UI toolkit has a canvas scaler equivalent, as well as a slider to prioritise width or height. It's very sleek
@fernandodut
@fernandodut 8 ай бұрын
With this method, how do we toggle among UIs?
@truth8483
@truth8483 9 ай бұрын
How would you make it so that , for a health bar, it updates based on an event from a health bar script? basically the dependancy is reversed, in my case I need the GUI to be dependant on the health script and not the health script to be dependant on values in the GUI that change. How can I do this?
@Tarodev
@Tarodev 9 ай бұрын
The health bar could subscribe to a static Player.HealthChanged event
@truth8483
@truth8483 9 ай бұрын
@@Tarodev okay so when I create it itself that generator functoin, subscribe to it, but will that create issues as the generate function is a coroutine , what happens to the previous subscription? will it create a memory leak?
@nanaschi
@nanaschi 3 ай бұрын
I see that you are using Rider as well, but my USS file shows errors where they shouldn't show. And it's considering the USS extension as CSS, despite I checked in FilePipes and there is a USS extension. But it shows errors where they shouldn't be, like when I create a USS variable with a root pseudo-selector or when I use some pseudo-selectors in some fields. Did you specifically set it up to recognize USS extension or it just works for you?
@Tarodev
@Tarodev 3 ай бұрын
I simply ignored those errors. I also filed a ticket to jetbrains about 6 months back but have no idea on its progress.
@nanaschi
@nanaschi 3 ай бұрын
@@Tarodev I see that you are struggling as well. The fun part is that in the file types I actually found the .USS extension, meaning that it should be recognized, but it's either not updated or it's pretended to be recognized and under the hood it's just treated as a CSS file. By the way, I want to tell you that your tutorials are supreme, and despite your latest video was long ago, I know that for the good content and actual desire to create this content, there is time needed, and I and all others appreciate what you do. Keep it up in your own pace, since I am the viewer feeling that you are enjoying the process, and this is the most important for me, that you are showing and discussing the topics that you are really interested about, and again, this requires time. Thanks.
@Tarodev
@Tarodev 3 ай бұрын
@@nanaschi thank you for saying that. I plan to make mroe content very soon 😊
@madboxtv6853
@madboxtv6853 9 ай бұрын
I have read on some forum and other youtuber chanel that the UiToolkit is terrible on performance du to string ref and maybe some other stuff. Did you feel this drop of performance ?
@peteolson2707
@peteolson2707 5 ай бұрын
Anyone else get `NullReferenceException: Object reference not set to an instance of an object` when fetching the rootVisualElement? My UI still renders, but I have this error acting like the UIDocument member is null, so presumably it's just happening at some point and not constantly.
@peteolson2707
@peteolson2707 4 ай бұрын
I think something I did caused the UIDocument GlobalObjectId to get updated. There was an update to the ID in the scene.unity file, once I reverted that change it was all good.
@libiroli
@libiroli 9 ай бұрын
Great tips, thank you! Btw I would like to buy you a new hat. NYY is uncool -- and not just because they're having a bad season. How about the Brisbane Bandits, the Doosan Bears, or the Tokyo Swallows?
@Mickplouffe
@Mickplouffe 9 ай бұрын
How? Why? I started to use UI Toolkit 3 days ago. Trying to make it work. I just figure it all out and THEN you publish a video about it? A month since last vid? Still thank you for this fantastic video! I still want more form you!
@Tarodev
@Tarodev 9 ай бұрын
How close is your technique to what I show here? I listed three workflows here, but honestly there are a few more I can think of. Quite a complex beast.
@fedeykin22
@fedeykin22 9 ай бұрын
Hmm sometimes _document.rootVisualElement is null. Anyone else get a null reference error when starting game?
@fedeykin22
@fedeykin22 9 ай бұрын
Nevermind! Tarodev answered that in a prompt on the screen :D
@Tarodev
@Tarodev 9 ай бұрын
This should be fixed soon enough :D@@fedeykin22
@user-es4fx7wo6r
@user-es4fx7wo6r 9 ай бұрын
it feels almost like making costum editor window in Unity. visual elements and other stuff. cool. i like it. not much to relearn
10 Things You NEED to Be Doing in Unity
11:40
Tarodev
Рет қаралды 125 М.
Unity Architecture for Noobs - Game Structure
16:24
Tarodev
Рет қаралды 185 М.
100😭🎉 #thankyou
00:28
はじめしゃちょー(hajime)
Рет қаралды 57 МЛН
How To Render 2 Million Objects At 120 FPS
14:57
Tarodev
Рет қаралды 135 М.
Organize Your SuperMemo Concepts with ChatGPT!
5:27
Pleasurable Learning
Рет қаралды 44
Build Procedural UI with Callbacks and Manipulators
28:14
git-amend
Рет қаралды 10 М.
Splaton Time
Astro Dwarf
Рет қаралды 6
Giving Personality to Procedural Animations using Math
15:30
t3ssel8r
Рет қаралды 2,4 МЛН
Building Runtime UI with UI Toolkit In Unity
21:35
Game Dev Guide
Рет қаралды 27 М.
Unity C# | Async / Await (Show in 20 seconds)
0:21
瓶裝雪
Рет қаралды 509
Envelop Budgeting: Building out Mobile
1:21:35
Jonathan Bennett
Рет қаралды 9