Create an in-game Inventory UI with UI Toolkit
UI Toolkit comes with sample controls, sample scripts and a debugger. All three are very helpful when working with the new UI system.
The UI Toolkit Debugger is as useful as the UI Builder and can be found at Window > UI Toolkit > Debugger. For anyone familiar with web development, you will notice that the debugger behaves similar to debug tools you’d find in the browser.
There are three main sections for the window:
I’ve noticed that Pick Element does not work well with runtime UI. It has worked wonderfully for Editor UI though.
Control examples are installed alongside UI Toolkit and can be found under Window > UI Toolkit > Samples. Keep in mind that most of the controls are for creating editor UI. That being said, they’re great references for how to interact with UI Toolkit.
The UI Toolkit package has optional script examples that can be imported into your project. Go to Package Manager > UI Toolkit and expand the Samples section. You can also find the scripts on the UI Toolkit GitHub.