UI Toolkit runtime examples
Explore examples of runtime UI.
阅读时间1 分钟最后更新于 25 天前
This section provides examples that demonstrate how to create and manage UI elements at runtime using the UI Toolkit.
General examples
The following examples demonstrate how to create and manage runtime UI elements.
Topic | Description |
|---|---|
| Get started with runtime UI | Use this example to get started with runtime UI. |
| Create a list view runtime UI | Use ListView to create a simple character selection screen runtime UI. |
| Create a pie chart in the Editor and runtime UI | Use the Vector API to create a pie chart. |
| Move elements at runtime | Use |
Panel Renderer script examples
The following examples demonstrate how to access, update, and add UI to a Panel Renderer component from a script.
Topics | Description |
|---|---|
| Display and update a progress bar every frame | Display the player's health in a progress bar and update it every frame. |
| Keep UI state when the UI reloads | Display a HUD with the player's health and score, and keep the values when the UI reloads. |
| Add UI to an existing Panel Renderer from a script | Add notifications to the UI of a Panel Renderer from a separate script, and keep them visible when the UI reloads. |