使用 Unity Package Manager(在 Unity 顶部菜单中:Window > Package Manager)可查看哪些包可供安装或已经安装在项目中。此外,还可使用此窗口查看哪些版本可用以及为每个项目安装、移除、禁用或更新包。
Package Manager 窗口显示以下内容:
(A) The preview package indicator, which warns you when your project contains preview packages. By default, the Package Manager does not show preview packages in the list. However, you can turn on the Enable Preview Packages project setting to include preview packages in the list.
(B) The add button, which you can click to install a package directly into your project from this window.
(C) The Packages drop-down menu, which you can use to filter which packages appear in the list.
(D) The Sort drop-down menu, which lets you sort the list of packages by name or date.
(E) The Advanced drop-down menu, which you can click to display preview packages in addition to those that have been verified to work with Unity.
(F) 搜索框,可用于按名称查找包。
(G) 包列表视图,显示与您指定的筛选条件和搜索参数匹配的所有包。
(H) 特定于包的详细信息视图,显示特定于列表中所选包的信息。
(I) The status bar, which displays messages about the package load status and warnings about the network.
(J) The reload button, which you can click to force Package Manager to reload your packages.
(K) 用于安装或更新包的按钮(如果所选版本已经安装,则显示 Up to date 消息。)
Advanced 下拉菜单允许您执行以下操作:
下拉菜单项 | 操作结果 |
---|---|
Reset Packages to defaults | 选择此选项可恢复为 Unity Package Manager 的默认设置。 警告:这将从项目清单文件中删除所有自定义项。仅当无法确定项目清单文件出了什么问题时,才应使用此选项作为最后的手段。 |
Show dependencies | 在详细信息视图中显示每个包的依赖项。 |
Show preview packages | 在包列表中包含预览包。 注意:预览包未经验证是否能够用于 Unity,并且可能不稳定。实际生产环境中不支持预览包。 |
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.