UI 工具包是用于开发用户界面 (UI) 的特性、功能、资源和工具的集合。您可以使用 UI 工具包为 Unity 编辑器、运行时调试工具以及游戏和应用程序的运行时 UI 开发自定义 UI 和扩展。
UI 工具包的设计灵感来自标准 Web 技术。如果您有开发网页或应用程序的经验,您的大部分知识可能是可以移植的,并且许多核心概念可能似曾相识。
注意: |
---|
尽管 Unity 建议在一些新的 UI 开发项目中使用 UI 工具包,但它仍然缺少 Unity UI (uGUI) 和 IMGUI 中的功能。这些较旧的系统更适合特定用例,并且需要支持已弃用的项目。有关何时适合选择旧系统而不是 UI 工具包的信息,请参阅Unity 中 UI 系统的对比。 |
本节简要介绍了 UI 工具包的主要特性、功能、资源和工具,包括:
UI 工具包的核心是一种保留模式的 UI 的系统,基于公认的 Web 技术。它支持样式表以及动态和上下文事件处理。
UI 系统包括以下功能:
UI 工具包提供了以下资源类型,您可以使用它们以类似于开发 Web 应用程序的方式构建用户界面:
UI 工具包还包括以下工具和资源来帮助您创建 UI:
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.