What about UI Toolkit? - UI in Unity

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
UI toolkit it's free it's built into the unity engine offers way more functionality than you GUI sounds pretty perfect right are you comfortable with web design do you want to learn web design how foreign UI toolkit felt when I was using it another big Pro and this is no small thing UI toolkit is free I just couldn't figure that one out UI toolkit may feel really comfortable and familiar and be a great addition to your Unity project UI toolkit is in this weird Alpha Beta mode finding objects by name using strings and are you okay if breaking changes come down the road well at least in my opinion it's not quite that simple so let's talk about UI toolkit so before we get into the pros and cons and my experience with UI toolkit there's one big elephant in the room with you by toolkit and that is the development timeline it was first announced in 2017 as UI elements with a roadmap released shortly after early 2018 and in that roadmap the goal was for Unity 2019.1 to have a release of UI toolkit with some functionality all with the goal of UI toolkit having parity meaning it's feature the equal features to you GUI by the time that Unity 20 20.3 is released well UI toolkit has come a long ways but it is still right now not able to replace you GUI the official release or the latest official release from Unity back in August 2022 so that UI toolkit right now is in maintenance mode for Unity version 2022 meaning no new features will be added to you I took it until Unity 2023 is released this means we're likely not going to see a feature complete version of UI toolkit until the calendar year 2024. that's six or seven years from the announcement to hopefully being feature complete so let's be a little less pessimistic and talk about the pros of UI toolkit well it it offers or at least promises far better layout control than you GUI a ton of the features that I find so attractive about Nova UI are already built into UI toolkit or are on the roadmap and hopefully are coming soon on top of that UI toolkit can be used to create custom editor Windows which is something that yugui will never do and I think Nova UI is very unlikely to ever do as well another big Pro and this is no small thing is that UI toolkit allows Styles or themes to be defined and reused in your project another big Pro for UI toolkit is the performance now if you're building smaller games you may not have noticed the performance of you Google I've rarely if ever run into it but if you change one element in a canvas unity's got to redraw the entire canvas whereas UI toolkit I think is going to do a lot of that for you and you're going to see better performance on the other end when you make a build and you're running your game and the last big Pro is of course that UI toolkit is free it's shipping with recent versions of unity and right there for some folks that is a good enough reason to ignore Nova and never go that direction just stay and learn UI toolkit all right let's talk about the cons because there are some definite cons the first one of course is will it ever be done will it ever be feature complete will it ever be capable of replacing you GUI and how much will it change from where it is now to that state and if you start a project now with a UI toolkit and in a year from now Unity releases a new version and you need some of those features if you bring that into your project is it going to break your project you're going to spend a bunch of time fixing that that is a potential big downside to you I took it there's two other things the two other big features that are missing from UI toolkit one is World space UI if you don't need it it's not a problem if you do need it UI toolkit just doesn't have a solution for it the other one is UI animation now UI toolkit has some animation if you look at unity's uh latest version of the Dragon Crashers project they've used UI toolkit as an example of how to make it work it's a really nice UI it feels good as interactive it's responsive it's great but if you need full and complete animation control of your UI you're going to need to look into what the limitations of UI toolkit are the last big con in my mind is the data binding with UI toolkit finding objects by name using strings this doesn't feel sustainable or scalable or at the very least it's not a pleasant way to operate in my opinion the devs have even mentioned this in their latest release that they're planning to revamp this and are looking for more generic solution but again what exactly that means and when that's going to get delivered is a big question mark all right so that's the pros and the cons but I think there's a couple other pieces in here that are worth talking about that for some folks are going to be in the Pro column and for some folks are going to be in the con column and the first big one this is a big one and I think for a lot of folks it's going to be the deciding factor is that UI toolkit reflects web design and web development so if you know that great if you don't it's gonna feel really different and fairly foreign compared to the normal Unity workflow the pattern of game objects components and prefabs is replaced with unity style sheets uxml and UI documents again not bad just really different the other big piece that surprised me and maybe it shouldn't that just shows my lack of experience is that UI toolkit elements are not seen they're not scene objects you can't see the UI in your scene view yeah there's a gizmo there it kind of shows you that it's there and gives you some idea of what's going on but you can't see the elements themselves you can't see where your menus are you can't see where your buttons are it's just different um for some folks that's great that separation of hey here's my game and here's my UI feels really good for a lot of other folks uh myself included that feels very different it's because it is different than our normal Unity workflow so when I was trying to put my thoughts together on UI toolkit I wanted to have some comparison something tangible to compare the three systems and I I knew it wasn't going to be super scientific I knew it wasn't going to be Apples to Apples but I wanted to have some experience building something in all three systems so I decided to do a bit of an experiment I built the same UI component in ugui in UI toolkit and in Nova UI what I wanted to build was a slider that as you moved it changed the alpha of an image and then I had buttons that would collapse the text and kind of all stack up together in the top of the screen now I wasn't trying to make them identical looking I wasn't going to do a lot of work with formatting and colors and make it look pretty I just wanted to see what the workflow was to build that code it and get it roughly functional the point of this experiment again was not to say that one tool is better than the other the point was to have an experience with all of these uh tools and see what that process is like that said for me with my experience my brain and my understanding it was clear that one tool in particular is easily the best choice in terms of the workflow and the quality of the final result but let me explain a little bit more let me qualify that a bit more I have zero experience with modern web design and development and while I'd like to think that I can learn and adapt to a new system I can't really convey how foreign UI toolkit felt when I was using it now sure I could open up UI Builder and drag and drop things and and adjust values in the inspector but I spent a few hours with it more than just the experiment that I just described I downloaded unity's recent version of dragon Crashers which makes use of UI toolkit I'll try to put a link to that in the description below and after spending some time messing around with it I had more questions and answers I very much struggled to see how things work together and how to do things as a concrete example there is a UI slider in the UI Library I drag that into the UI Builder I could make it longer I could change the value of it I could change colors but for the life of me I couldn't make it thicker I couldn't make it taller I even Googled it I spent a bunch of time working out I just couldn't figure that one out and now certainly there is a way to do it right there is a way to do that but I couldn't find it and to me that alone was an interesting experience another thing that I thought was really interesting was the UI Builder uh and there's no way for me to sugarcoat this the performance of the UI Builder window is horrible now if you just have one or two elements in that uh window and you're dragging a value around you're not going to notice anything but I opened up the dragon crusher's main menu which admittedly is pretty complex I was dragging a single value and the frame rate dropped dramatically almost to make it unusable almost it's still usable but it really made it hard to use I even opened up the profiler to see what was going on am I just like making this up is there something weird going on and sure enough there's a huge lag Spike when dragging that I open up a new project clean project added four five six elements to the scene and I started to see the same thing so there's definitely something not quite right or not quite optimized there but the question might still be out there for you should you use UI toolkit in your next project and I think it can come down to two really big questions there's other questions but there's two really big questions first do you know and do you like web design and development if you do UI toolkit may feel really comfortable and familiar and be a great addition to your Unity project the other question is and I talked about this a little bit is are you okay with changes so if you start a project today with UI toolkit and in six months nine months 12 months 18 months Unity releases a new version of it that's got features that you need that you really want in your project and you add that to your project and it breaks things are you okay with that those are the two big questions I think you got to answer if you're going to use UI toolkit are you comfortable with web design do you want to learn web design and are you okay if breaking changes come down the road but here's the best part of the situation all three of those tools Nova ugui and UI toolkit can be tried for free Nova UI has a free version you GUI and UI toolkit are both shipping with the newest versions of unity so my suggestion is do what I did get all three of these and sit down and build the same UI component in each of these tool sets see what it feels like see what the workflow looks like and of course the one or two systems that you're not very familiar with are going to take longer it's going to be frustrating I love no vui it is my solution moving forward for the foreseeable future but those first couple days as I was working with it yeah I made a lot of mistakes and there were some frustrating things and there's a learning curve but I could tell right away that that workflow worked for me and my experience and my project and that's what I hope you guys can do as well so at the end of the day I hope this video was interesting and better yet useful for you and your project and until next time happy game designing all right take number two because the last one went so smoothly
Info
Channel: One Wheel Studio
Views: 14,554
Rating: undefined out of 5
Keywords: Unity3d, Indie Game, Game Development
Id: Wz3k6afpDv8
Channel Id: undefined
Length: 11min 2sec (662 seconds)
Published: Tue Nov 15 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.