UI Toolkit Primer - Build UIs like a Programmer

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ม.ค. 2025

ความคิดเห็น • 258

  • @maxfun6797
    @maxfun6797 ปีที่แล้ว +36

    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.

  • @bakasan9424
    @bakasan9424 ปีที่แล้ว +62

    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.

    • @MagicCubeWorld
      @MagicCubeWorld หลายเดือนก่อน

      Tarodev is the man. I see a video for a problem i'm having by Tarodev, it gets priority in the handful of videos I watch on the topic. Might not even need the others.

  • @felfurion8624
    @felfurion8624 ปีที่แล้ว +21

    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  ปีที่แล้ว +21

    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: th-cam.com/video/xbEcynEnKLI/w-d-xo.html

    • @DaYooperDev
      @DaYooperDev ปีที่แล้ว +6

      The link to the Unity docs accidentally had the right parenthesis included in the URL, removing that will take you to the proper page.

  • @captainnoyaux
    @captainnoyaux ปีที่แล้ว +4

    and when the world needed him the most ... he returned !!! Thanks for that video I'll consume it later !

  • @DailyPass
    @DailyPass ปีที่แล้ว +6

    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  ปีที่แล้ว +10

      Clickbait successful.

    • @ZOMGbies
      @ZOMGbies ปีที่แล้ว +5

      ​@@Tarodev Saw your channel logo and thought I was getting some tasteful chibi hentai. Now I'm trying to code a game.

    • @XiezYTGaming
      @XiezYTGaming 3 หลายเดือนก่อน

      th-cam.com/video/9tqet1rQw5k/w-d-xo.html help me unity keeps crashing on creating any kind of new project in any version of unity whether it's new, old or LTS...

  • @lemonlimebitta8903
    @lemonlimebitta8903 ปีที่แล้ว +1

    oh man taro delivers just when I needed it!

  • @toprogress
    @toprogress ปีที่แล้ว +1

    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 11 หลายเดือนก่อน

      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…

  • @cedrica.3178
    @cedrica.3178 ปีที่แล้ว +7

    Perfect timing, I needed a good tutorial on this for a project. You're a savior.

  • @dragone427
    @dragone427 ปีที่แล้ว +1

    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!

  • @SojoTaku
    @SojoTaku ปีที่แล้ว +7

    I am a simple man,
    I see gamer girl in thumbnail,
    I click
    Noice tut tho!!

  • @michaellee1610
    @michaellee1610 ปีที่แล้ว

    This is the best tutorial for unity's UI toolkit on the entire internet

  • @smokinglife8980
    @smokinglife8980 ปีที่แล้ว +1

    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 10 หลายเดือนก่อน +3

      *fast paced

  • @MrLachlan21
    @MrLachlan21 ปีที่แล้ว

    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  ปีที่แล้ว

      I appreciate the kind words mate 😊 thanks for watching even when you didn't need it ❤️

  • @nielsbrons
    @nielsbrons ปีที่แล้ว

    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

  • @corviraptor
    @corviraptor ปีที่แล้ว +1

    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.

  • @1Chitus
    @1Chitus ปีที่แล้ว +1

    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.

  • @alaslipknot
    @alaslipknot ปีที่แล้ว +2

    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 ปีที่แล้ว

      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 ปีที่แล้ว +1

      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.

  • @steveradtke1308
    @steveradtke1308 ปีที่แล้ว +3

    Keep up the good work my man.

  • @Director414
    @Director414 ปีที่แล้ว +5

    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! 🍻☺

  • @hanya-chan454
    @hanya-chan454 ปีที่แล้ว +1

    i was littrely thinking of making new UI to my game and u posted this vid lol, thanks a lot!

  • @frankreiser_recaremo
    @frankreiser_recaremo ปีที่แล้ว

    Amazing - this is the way to do it like a pro. Hope you will continue the tutorials with UI Toolkit.

  • @IdeaToGame
    @IdeaToGame ปีที่แล้ว

    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  ปีที่แล้ว +1

      You're most welcome and I'm glad you enjoyed 🙂

  • @Foxyzier
    @Foxyzier ปีที่แล้ว +2

    I love using the ui toolkit but some parts have been kinda shady for me, love that you have covered most of them

  • @petpumpkin
    @petpumpkin ปีที่แล้ว +1

    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?

  • @tudorelRo
    @tudorelRo ปีที่แล้ว +3

    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.

  • @TedThomasTT
    @TedThomasTT ปีที่แล้ว +2

    Another banger tutorial 🍻

  • @criadabatterista8647
    @criadabatterista8647 ปีที่แล้ว +1

    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?

  • @dovmandev
    @dovmandev 6 หลายเดือนก่อน

    I really liked how you simply explained everything in such a short time. God bless you.
    But I also need to personally think about how to write your version for my own style code.
    I'm a KISSEnjoer, which you managed to follow for the most part 💘

  • @RossYlitalo
    @RossYlitalo 11 หลายเดือนก่อน

    Very cool tutorial--also it was fun watching you zip through this stuff.

  • @chessersstudios1778
    @chessersstudios1778 ปีที่แล้ว +1

    tardev back with the thristy thumbnails

  • @DimaChebanov
    @DimaChebanov ปีที่แล้ว +2

    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  ปีที่แล้ว +1

      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 ปีที่แล้ว

      @@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.

  • @thr1sn0sp0on
    @thr1sn0sp0on ปีที่แล้ว

    Thank you! Awesome jump start video 🙏

  • @yufisjr
    @yufisjr ปีที่แล้ว +1

    Thanks for the new video Sifu! :)

  • @iDigvijaysinhG
    @iDigvijaysinhG ปีที่แล้ว

    Cool, finally this video will push me to transition to UI toolkit.
    Amazing video as always

  • @KalimistDev
    @KalimistDev ปีที่แล้ว

    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  ปีที่แล้ว

      Rider has a copilot plugin :) Works beautifully.

    • @XiezYTGaming
      @XiezYTGaming 3 หลายเดือนก่อน

      th-cam.com/video/9tqet1rQw5k/w-d-xo.html help me unity keeps crashing on creating any kind of new project in any version of unity whether it's new, old or LTS...

  • @ohyonghao
    @ohyonghao 10 หลายเดือนก่อน

    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  10 หลายเดือนก่อน

      Glad you liked the format 😊

  • @nerdin8or
    @nerdin8or ปีที่แล้ว +6

    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  ปีที่แล้ว +3

      Reusable components is a cakewalk! Checkout my Tarodev repo on git. I also built a scss/less/stylus -> uss compiler plugin.

  • @jonathanthompson8741
    @jonathanthompson8741 ปีที่แล้ว +1

    This just earned a subscribe from me. Very awesome tutorial.

  • @TilDrill
    @TilDrill 11 หลายเดือนก่อน +1

    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

  • @jahoopyjaheepu497
    @jahoopyjaheepu497 10 หลายเดือนก่อน

    excellent tutorial, thank you so much!

    • @Tarodev
      @Tarodev  10 หลายเดือนก่อน +1

      No... Thank you

  • @bazeragi
    @bazeragi ปีที่แล้ว

    Amazing video! thanks!!

  • @nikoleovu
    @nikoleovu ปีที่แล้ว +2

    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  ปีที่แล้ว +1

      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.

  • @xDarkxTriviumx
    @xDarkxTriviumx ปีที่แล้ว +1

    Perfect introduction into UIToolkit. Guess I have no excuse for avoiding switching from Canvas now xD

    • @ZOMGbies
      @ZOMGbies ปีที่แล้ว

      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

  • @ElongateFeel
    @ElongateFeel 6 หลายเดือนก่อน

    Nice one. Is there a way to avoid the hard coding of the class styles? e.g. "bordered-box" shows up a couple of times in the C# script but also in the uss style sheet

  • @ewwitsantonio
    @ewwitsantonio ปีที่แล้ว

    a NEW Tarodev video?? woooo!

  • @thygrrr
    @thygrrr ปีที่แล้ว

    Why are there dashes before the var --border-width ?

  • @Tharky
    @Tharky ปีที่แล้ว +4

    I'm here for Taropoints.

    • @Tarodev
      @Tarodev  ปีที่แล้ว +2

      1 taropoint has been allocated to your account

    • @ZOMGbies
      @ZOMGbies ปีที่แล้ว

      o_o'@@Tarodev

    • @Tarodev
      @Tarodev  ปีที่แล้ว

      @@ZOMGbies One point for you too!

  • @Mavzu132
    @Mavzu132 9 หลายเดือนก่อน

    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.

  • @kadircalloglu2848
    @kadircalloglu2848 ปีที่แล้ว +1

    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?

  • @jubinjajoria2870
    @jubinjajoria2870 ปีที่แล้ว

    Damn... That's a really great in-depth tutorial.

  • @vector7932
    @vector7932 ปีที่แล้ว

    Great awesome video tutorial!

  • @DanDarger
    @DanDarger ปีที่แล้ว

    Brilliant as always. Thanks Taro! Does the tweening support easing functions? Also is there an equivalent of scss?

  • @aeliusdawn
    @aeliusdawn ปีที่แล้ว

    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.

  • @stashatstake
    @stashatstake ปีที่แล้ว

    Thank you for this, Taro

  • @syntaaxfps
    @syntaaxfps ปีที่แล้ว +2

    U did really good in the 5devs video haha

    • @Tarodev
      @Tarodev  ปีที่แล้ว +1

      Which one? I've done a few now 😅

    • @syntaaxfps
      @syntaaxfps ปีที่แล้ว +2

      @@Tarodev every time u were there haha

  • @adamodimattia
    @adamodimattia 9 หลายเดือนก่อน

    Awesome stuff, great tutorial, I was worried whether UI Toolkit can do any tweening animations.

  • @diligencehumility6971
    @diligencehumility6971 ปีที่แล้ว

    Nice video. How would you do drag-and-drop in this UI framework?

  • @restushlogic5794
    @restushlogic5794 ปีที่แล้ว +2

    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 😢

  • @Ricochetaglet
    @Ricochetaglet ปีที่แล้ว

    I don't know what's happening, yet. But I'm here for it!

    • @Tarodev
      @Tarodev  ปีที่แล้ว

      Oh and what exactly brought you in, Rico? The thirst for knowledge?

  • @attckDog
    @attckDog ปีที่แล้ว +3

    I'm here for the hot wifus and I suppose also the good unity tips ;)

  • @hegworks
    @hegworks ปีที่แล้ว

    great video man, hella useful!

  • @MarkusDev
    @MarkusDev ปีที่แล้ว

    @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 ปีที่แล้ว

    Cool introduction. I really hope Unity figures out databindings at runtime soon, that would solve a lot of magic string issues.

  • @FakeMelon
    @FakeMelon ปีที่แล้ว +1

    Your tutorials are so good man. straight to the point. love it!

  • @avalacos
    @avalacos ปีที่แล้ว +1

    Can you use this new UI toolkit to create world space UI?

  • @starbuck3980
    @starbuck3980 5 หลายเดือนก่อน

    Dont understand how works the new UI. I added a Progress bar and i cant modify any of the style properties of the child objects, all are greyed out

  • @CornuDev
    @CornuDev ปีที่แล้ว +1

    Wow, I would like to try this.

  • @xanderlinhares
    @xanderlinhares ปีที่แล้ว

    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?

  • @andrewalexart
    @andrewalexart ปีที่แล้ว +4

    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

  • @violon212
    @violon212 ปีที่แล้ว

    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?

  • @TrapStream
    @TrapStream ปีที่แล้ว

    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.

  • @mikedavies4237
    @mikedavies4237 ปีที่แล้ว

    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?

  • @ChuanChuanSaga
    @ChuanChuanSaga 11 หลายเดือนก่อน

    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!

  • @timurradman3999
    @timurradman3999 ปีที่แล้ว +1

    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 ปีที่แล้ว +4

      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.

  • @Obscurely
    @Obscurely ปีที่แล้ว

    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.

  • @fernandodut
    @fernandodut ปีที่แล้ว

    With this method, how do we toggle among UIs?

  • @MagicCubeWorld
    @MagicCubeWorld หลายเดือนก่อน

    8:30 as far as Copilot goes, I really don't like external AI on my computer. I'm following along with the Continue VS Code extension, with Qwen 2.5 Coder 1.5b as my tab autocomplete AI, and it gave me the same recommendation as Copilot gave you, but only after I started typing "root". But I feel a lot better knowing Continue/Qwen/Ollama is local.

    • @MagicCubeWorld
      @MagicCubeWorld หลายเดือนก่อน

      For anybody else who doesn't like external AI on their computer but interested in AI code assist, the setup I mentioned has been giving me all of the same predictions as Tarodev, and pretty much all as early as him, too. I had both entire Create methods he wrote completely predicted for me verbatim.

  • @stevenrodkiss473
    @stevenrodkiss473 ปีที่แล้ว +1

    "Copilot is inside my head" Tarodev (Aug 30, 2023)
    Love it.

    • @Tarodev
      @Tarodev  ปีที่แล้ว

      It scares me sometimes

  • @jesserowan9808
    @jesserowan9808 11 หลายเดือนก่อน

    How did you get Rider to recognize USS files? I'm getting inspector errors on things like the :root selector, using %, etc

    • @Tarodev
      @Tarodev  11 หลายเดือนก่อน

      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

  • @aeliusdawn
    @aeliusdawn ปีที่แล้ว

    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  ปีที่แล้ว +2

      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 😊

  • @Ingo.Mclean
    @Ingo.Mclean 8 หลายเดือนก่อน

    @Tarodev I'd be interested in that radar graph. I didn't see a tutorial on it

    • @Tarodev
      @Tarodev  8 หลายเดือนก่อน +1

      Checkout my repo here: github.com/Matthew-J-Spencer/Tarodev
      Specifically the UI Toolkit Helpers

    • @Ingo.Mclean
      @Ingo.Mclean 8 หลายเดือนก่อน

      @@Tarodev thnx! I’ll try that out on Monday

    • @Ingo.Mclean
      @Ingo.Mclean 8 หลายเดือนก่อน +1

      @@Tarodev question, could I take that chart and convert it into a Polar chart? Used for acoustic plots, I didn’t see anything online about it for Unity and this radar plot is about as close as I can see (but will be either in 360° or even radian measurements)

    • @Tarodev
      @Tarodev  8 หลายเดือนก่อน +1

      @@Ingo.Mclean You absolutely can. If I remember, I made the radar as just individual stacked graphic api calls. Your polar would just have a bunch more stacked.
      The hard part would be working out the positional points to draw them, but other than that it should be quite streamlined.

    • @Ingo.Mclean
      @Ingo.Mclean 7 หลายเดือนก่อน

      @@Tarodev WRT the values "e", "v" in controlBox.experimental.animation.Start(0, 1, 2000, (e, v) => e.style.opacity = new StyleFloat(v)); where do those come from? I'm just now starting to use events in my code (haven't used them in 3 years learning Unity... behind the power curve) reading the Unity Class for Unityevents doesn't list it, adn I did a search for "unityevents events e v=>" and others just to see if I can see it in Unity's scripting API or forums

  • @Shonia
    @Shonia ปีที่แล้ว +1

    Big return!

  • @senzubeamz
    @senzubeamz ปีที่แล้ว +1

    I always thought treating unity UI like it's web is a great idea, now it's reality!

  • @bangliu9650
    @bangliu9650 ปีที่แล้ว

    How can we change the cube in the project file back to a character 3d prefab, with animation?

    • @Tarodev
      @Tarodev  ปีที่แล้ว

      Message me on patreon :)

  • @RegahP
    @RegahP ปีที่แล้ว +1

    Tarodev sure knows how to attract programmers lmao

  • @vitorfigueredo18
    @vitorfigueredo18 ปีที่แล้ว

    Hey, what about differente screen sizes, does it handle well?

    • @Tarodev
      @Tarodev  ปีที่แล้ว

      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

  • @ProfessionalJason
    @ProfessionalJason ปีที่แล้ว

    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  ปีที่แล้ว +1

      Ensure you have a transition property.
      .thing{
      transition: all 0.5s ease-in-out-sine;
      scale: 1;
      }
      .thing:hover{
      scale: 1.5;
      }

  • @あれくす
    @あれくす ปีที่แล้ว

    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.

  • @ZOMGbies
    @ZOMGbies ปีที่แล้ว

    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.

  • @epicmcdude
    @epicmcdude ปีที่แล้ว

    Goddamn I JUST upgraded my project to 2022.3 and wondering how UI Toolkit works. thanks, man!

    • @ZOMGbies
      @ZOMGbies ปีที่แล้ว

      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.

  • @pocket-logic1154
    @pocket-logic1154 ปีที่แล้ว

    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 ปีที่แล้ว

      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).

  • @あれくす
    @あれくす ปีที่แล้ว

    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  ปีที่แล้ว

      The health bar could subscribe to a static Player.HealthChanged event

    • @あれくす
      @あれくす ปีที่แล้ว

      @@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?

  • @ludwigmoser-spitzenstatter5859
    @ludwigmoser-spitzenstatter5859 5 หลายเดือนก่อน

    thats how to do it! i am programmer, not game developer (yet). how do you add an texture/image/icon to an element eg. button via code?

  • @RudolfsLab
    @RudolfsLab ปีที่แล้ว

    This is a godsend

  • @alaaabusarah9568
    @alaaabusarah9568 ปีที่แล้ว

    It's cool make a editor UI with it 🔥

  • @lizkimber
    @lizkimber 10 หลายเดือนก่อน

    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

  • @nanaschi
    @nanaschi 10 หลายเดือนก่อน

    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  10 หลายเดือนก่อน +1

      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 10 หลายเดือนก่อน

      @@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  10 หลายเดือนก่อน +1

      @@nanaschi thank you for saying that. I plan to make mroe content very soon 😊

  • @fedeykin22
    @fedeykin22 ปีที่แล้ว +1

    Hmm sometimes _document.rootVisualElement is null. Anyone else get a null reference error when starting game?

    • @fedeykin22
      @fedeykin22 ปีที่แล้ว +1

      Nevermind! Tarodev answered that in a prompt on the screen :D

    • @Tarodev
      @Tarodev  ปีที่แล้ว +1

      This should be fixed soon enough :D@@fedeykin22

  • @HunterSchramm
    @HunterSchramm ปีที่แล้ว

    HE'S BACK