Extending the Unity Editor with custom tools using UI Toolkit | Unite 2022

preview_player
Показать описание
Like building your own UI tools? Here we go step by step with the UI Builder to quickly create an Inspector for real-time Play mode debug data visualization. Then we’ll enhance it using USS Transitions and the Vector API, migrate it to a custom Editor window, and finally port it to the Player/Runtime.

00:00 - Introduction
02:30 - Custom Property Drawers with Nested Inspectors
08:52 - Decorate with Property Attributes
10:07 - Custom Inspectors
14:02 - UI Documents (UXML)
15:22 - UI Builder for Editor Extension Authoring
19:22 - UI Builder Visual Authoring Workflows
22:33 - Painter2D and Custom UI Shapes (PieChart)
26:02 - Rich Text (with Hyperlinks)
26:58 - StyleSheets (USS)
27:58 - Editor Standard USS Variables (Light/Dark Theme Support)
29:55 - UI Toolkit Samples Window
31:25 - ListView (Virtualized List)
32:50 - Multi Column ListView
38:48 - Runtime Theme Used In Editor
39:45 - USS Transitions on Hover
40:10 - USS Transform Styles (scale/position/rotate)
41:08 - Custom Editor Windows
43:01 - Custom Inspector in Runtime (Player)
44:45 - UI Builder In-Context Sub-Document Workflow
45:33 - New UI Toolkit Data Bindings (Runtime and Editor) in Unity 2023
Рекомендации по теме
Комментарии
Автор

Programming this still feels like chaos. They could be inspired by simpler implementations like Odin does. However, the big advantage is that you don't have to wait for the compilation to see the result, this really is very useful.

masterz
Автор

Honestly, you should do more videos like this because even that I'm working with the system for like 2 years now professionally (as a tool programmer hired by studios) I didn't know half the features you were showing there. And not like I didn't try, but the general documentation is dogshit compared to this one video. Most of my UI Toolkit knowledge comes from colleagues and forums and stuff like that. It's like in the '90s ffs.

MiklosHajma
Автор

It looks great, but we need world space UI also for UIToolkit, otherwise, if your project requires it, you are forced to use 2 UI systems together with 2 UI event systems, etc.

jorhoto
Автор

Is anyone else having their mind blown by the serializable object reference on the script asset at 16:35? I had no idea you could even do that!

scottinglis
Автор

This looks great, especially the new binding sneak peak. Really looks like a lot of this was inspired by WPF bindings.

crazyfox
Автор

being able to create elements like the pie Chart in the editor is really an interesting feature, I didn't know it was possible x)

BRtn-nnnr
Автор

Best presentation this Unite! Thanks a lot for the deep dive into the improvements and the great flow through the different options. The changes are very impressive. I think for me UI Toolkit will become the go-to implementation for Editor UI, for Runtime UI I'm still a bit skeptical, if this will work for UI artists and how the connection to "normal" GameObjects is done, since sometimes you will need them (e.g. 3D objects, Particles). Looking forward to a streamlined solution for that as well ♥

JohannesDeml
Автор

This video has really helped me elevate my editor, thank you!

MortalVildhjart
Автор

This looks fantastic! I'm looking forward to playing with and learning all of this. :)

MegamanXGold
Автор

Excellent video. Thanks for the insight

benjaminlehmann
Автор

Thanks for pointing out new stuff related to UI Toolkit!

notlaw
Автор

How does something like this interact, potentially, with Odin?

seatbaber
Автор

I've been using UIToolkit a lot for general UI< but we really need better Sprite support and features, most thing that UGUI did have to be coded manually, like loading multi-sprite resources properly or fills.

Bankoru
Автор

50% of all devs will not look past those hard coded strings around 5:55
Happy Unity is finally moving to markup for UI tho 👍

PontusWittenmark
Автор

I would love a full TreeView RunTime Tutorial, with everything, POCOs of Different Types Nested in each other, with drag and drop and styles where Fonts can be changed and columns heighs, widths, header sizes etc

mikecu
Автор

Awesome video, thanks for the great content!

siyuanrocks
Автор

Excellent! Thank you for doing this talk!

EvgeniPetrov
Автор

Great video, but at least give us the repo to check the code.... please....

raymk
Автор

You guys NEED to find a way to make property lookups not work on strings, but directly on the fields/properties of the target type. How is this supposed to survive even something as simple as a rename refactor? I dunno, do something with the Roslyn or something!

thygrrr
Автор

Was the multi column list view, the health part (and the starting one at that) was already working as a slider? Or needs to be callback registered too? I ask because of the virtualized situation that it needs to bind to a re-used one, so I’m guessing for that to work it needs four or five parts?
- The creation of it for new ones when no more left are int he pool (the make item part)
- The bind everytime one item comes into view and a cell is reuse (bindItem)
- Register a callback for that new item? Or is it done by the bind itself or around inside there?
- Deregister the callback? Before unbinding happens?
- Unbind calls.

Then there’s also the callback itself, how and which item a changing value targets.
It’s possible that it’s automatic but just wanted to know how it goes about it.
Great talk, have been avoiding UI Toolkit for too long now.

alejmc