UI Toolkit Tutorial - Style Variables and Multiple Menus
In this second video I will edit my project to use USS style variables, update theme sheet and add a second menu screen.
I will be covering in the series :
- Basic use of the UI Builder
- How to effectively style your UI
- Setting up a project to use multiple menus
- Creating custom controls
- Using both the Scroll View and the List View
Link to assets used :
- Orbitron Font - www.theleagueofmoveabletype.c...
- Bootstrap Icons - icons.getbootstrap.com/#install
github.com/twbs/icons/releases/
Other useful links :
- UI Toolkit Psudo classes - docs.unity3d.com/2020.1/Docum...
Пікірлер: 33
Jesus. This tutorial was sooo hard to find. I didn't find anyone else explaining how to actually switch between menus. Thank you very much
Very useful videos, continue!
So sad you didn't add more tutorials, you're a very good instructor.
Again - amazing!! Hope and wait for next video
Thank you, this was helpful.
Excellent tutorials.
I'd love to see a tutorial for overriding unity styles for dropdowns and the like. It's so hard to find info about anything. This video alone has given me more answers than most of my searches.
Thanks! I was totally lost before these tutorials.
Excellent video! Its so sad that the Unity documentation of UI Toolkit is so strange to understand. This video was a great help!
Thanks, this was very helpful
so great, please make more! :)
Hi, I hope all is well, will you be continuing teaching about UI development? Your tutorials are the best i've seen on these topics, I really hope you will continue with your teachings! cheers
thanks very helful. also there are no tutorials about listviews. Can you create a video about them? and maybe how to create elements dynamically inside it
@bunnycoding1204
Жыл бұрын
Hi thanks for the comment. Yes I am going to do a video on list and scroll views.
Hi, thanks for taking the time and making the tutorial. However, I get an error when running the code at 36:40 ("Object reference not set to an instance of an object"). Can I download the / see the code somewhere? Where and how did you implement the Display extension? Thank you!
@cklaffer
Жыл бұрын
Nevermind, had a typo xD
@bunnycoding1204
Жыл бұрын
Glad you found the fix. If you want to see the implementation of the Display extension then have a look at this 26:09. I put the code up on the screen. I will also make the project publicly available before my next video so everyone can follow along with what I am doing.
@cklaffer
Жыл бұрын
Thanks again. If you have time, I would greatly appreciate it, if you showed us how to achieve some sort of menu screen transition, maybe a fade in / out or swiping animation, if this is possible with UI Toolkit.
@bunnycoding1204
Жыл бұрын
It is possible, after some comments I had from the last video I have added it to the end of the course. It will be video 5 or 6, but it is defiantly coming.
I'd like to add sound effects on events like hover but haven't found information about it. That's a good topic for a tutorial in my opinion.
@bunnycoding1204
Жыл бұрын
That's a great idea, thanks. :)
Hello, sir! I'm new to UIToolkit. Could one switch between menus just by switching the Source Asset on the UIDocument in runtime or is it considered a bad practice? Thanks for the videos, they are super helpful!
@bunnycoding1204
Жыл бұрын
You can do this, however I would be careful as you will likely lose all the references that you had built up to that point. If you really want to keep your UXML files completely separated I would suggest having multiple UIDocument gameobjects in your scene, each with their own presenter class and then turn the gameobjects on and off. However I am not sure what the implications of doing it this way are yet.
@tjumma
Жыл бұрын
@@bunnycoding1204 Thank you. I'll try doing things this way and report back if I face any issues
I got :root working as well as creating base styles for things like button--primary, button--secondary etc but when I start a second scene and add another UI focument which uses the same USS for button--primary etc, it doesn't seem to be able to connect to the :root variables we created and so nothing gets styled. Any ideas?
can you please provide any information regarting changing the icons colors ect? i have been searching everywhere and cannot figure out how to change them.
@bunnycoding1204
Жыл бұрын
The first think you want to do is make sure that the icons are white. Then once they are applied to a visual element as a background image you can change the background image tint colour. This will then change the colour of your icon.
My Settings window looks fine in the UI builder when I disable the MainMenu, but when I hit play and click settings it opens the settings window all smooshed with the startscreen/mainmenu showing at a normal size on the "layer" underneath. Any ideas?
@bunnycoding1204
Жыл бұрын
It sounds like the main menu is not being disabled correctly.
i cant edit the drop down, the child elements are grey out and deactivated
How can I resize unity standart controls (toggle, dropdown)??? Their children are blocked in UI Builder(((((
@bunnycoding1204
Жыл бұрын
I will make a mini series for each control. But what you need to do is look through the hierarchy of the element and add the .unity classes to your USS files then change the values there. I will add a part in the next video about the concept.
Hey, thank you :) (just a timestamp 7:30)