84c3c498e5 | ||
---|---|---|
.github | ||
ListViewExample/Editor | ||
ToggleExample/Editor | ||
bind-custom-control | ||
bind-custom-data-type | ||
bind-nested-properties | ||
bind-to-list | ||
bind-to-list-without-listview | ||
bind-uxml-template | ||
bind-with-binding-path/Editor | ||
bind-with-uxml-csharp/Editor | ||
bind-without-binding-path/Editor | ||
callback-SerializedProperty-changes/Editor | ||
callback-any-SerializedProperty-changes | ||
create-a-binding-inspector | ||
create-a-custom-editor-window-with-CSharp | ||
create-a-custom-inspector | ||
create-a-custom-swirl-filter | ||
create-a-drag-and-drop-window-inside-a-custom-editor-window | ||
create-a-popup-window/Editor | ||
create-a-tabbed-menu-for-runtime | ||
create-a-transition | ||
create-bindable-custom-control | ||
create-custom-control-with-custom-attributes | ||
create-custom-style-custom-control | ||
create-listview-runtime-ui | ||
create-listviews-treeviews | ||
drag-and-drop-across-window | ||
loop-transition-example/Editor | ||
pie-chart | ||
radial-progress | ||
radial-progress-vector-api | ||
relative-and-absolute-position | ||
simple-runtime-ui | ||
simple-ui-toolkit-workflow | ||
slide-toggle | ||
transition-events-example | ||
wrap-content-inside-scrollview/Editor | ||
.gitignore | ||
LICENSE.md | ||
README.md |
README.md
UI Toolkit Manual Code Examples
This repo includes the code examples for Unity's UI Toolkit documentation. The code examples in this repo don't work by themselves and the repo doesn't include any project files.
You must follow the steps in the UI Toolkit user manual to create the examples. You can create the examples with any Unity template and with the sample scene. Most of the examples were created with Editor UI for demo purposes, but they will work for runtime UI.
Editor UI examples
Runtime UI examples
Custom controls examples
- Create a slide toggle custom control
- Create a radial progress indicator
- Create a bindable custom control
- Create a custom style for a custom control
- Create a custom control with two attributes
Basic binding examples
- Bind with binding path in C# script
- Bind without the binding path
- Bind with UXML and C#
- Create a binding with the Inspector
- Bind to nested properties
- Bind to a UXML template
- Receive callbacks when a bound property changes
- Receive callbacks when any bound properties change
Advanced binding examples
- Bind to a list with ListView
- Bind to a list without ListView
- Bind a custom control
- Bind a custom control to custom data type
UI controls examples
- Use Toggle to create a conditional UI
- Wrap content inside a scroll view
- Create list and tree views
- Create a complex list view
- Create a list view runtime UI
- Create a pop-up windows
- Create a tabbed menu for runtime
Transition examples
Drag-and-drop UI examples
- Create a drag-and-drop UI inside a custom Editor window
- Create a drag-and-drop UI to drag between Editor windows