Use the Unity Package Manager (in Unity’s top menu: Window > Package Manager) to view which packages and feature sets are available for installation or already installed in your project. In addition, you can use this window to see which versions are available, and install, remove, disable, or update packages and feature sets for each project.
Package Manager 窗口显示以下内容:
(A) The experimental package indicator, which warns you if your project contains experimental packages.
(B) The add button, which you can click to install a package directly into your project by entering a git URL, a local path, or a package name.
(C) Packages 下拉菜单,可用于更改列表(上下文)中的显示内容。
(D) The Sort drop-down menu, which lets you sort the list of packages and feature sets by name or date.
对于 Asset Store 资源包,两个额外的控件为您提供了一些额外的过滤选项:
(E) Advanced settings , which you can use to access the project settings for the Package Manager or reset your project’s packages and feature sets to default.
(F) The search box, which you can use to look for packages and feature sets by name.
(G) The list view, which displays all packages that match the filter and search parameters you specify.
(H) The detail view, which displays information specific to the feature set or package selected in the list. For example, if a feature set is selected, the information specific to the feature set appears, including which packages it contains.
(I) The status bar, which displays information when Package Manager loads packages and feature sets. This includes errors and warning messages, the number of Asset Store packages available, and a link to load more Asset Store packages.
(J) The reload drop-down menu, which lets you force Package Manager to reload or resolve the packages in your project.
(K) Buttons to perform any of the following actions:
The advanced settings drop-down menu allows you to perform these actions:
下拉菜单项 | 操作结果 |
---|---|
高级项目设置 | Select this item to open the Package Manager project settings, where you can: - Add, edit and remove scoped registries in your project. - Show pre-release packages when browsing the Unity Registry. - See which packages are installed as dependencies of another installed package (indirect dependencies). |
Reset Packages to defaults | 选择此选项可恢复为 Package Manager 的默认设置。 警告:这将从项目清单文件中删除所有自定义项。仅当无法确定项目清单文件出了什么问题时,才应使用此选项作为最后的手段。 |
Package Manager 在 Package Manager 窗口左下角的状态栏中显示消息。
通常,您可能会看到四种状态消息:
The first time you open the Package Manager window in a new project, the Refreshing packages message appears briefly:
This message also appears when you select Refresh list from the reload drop-down menu.
When you are using the My Assets context, the load bar appears above the date. It displays the number of Asset Store packages and a Load link:
Most of the time the status bar displays the date and time of when the Package Manager window last refreshed its information. However, if the Package Manager detects a problem, such as a missing network connection, the Package Manager displays an error in the status bar:
如果您的网络连接正常,但是您没有登录 Unity 帐户,则 Package Manager 不会显示任何 Asset Store 资源包。尝试使用 My Assets 上下文时,Package Manager 会在状态栏中显示错误:
In the list view, click the Sign in button to sign into your Unity account through the Unity Hub.
有关如何解决这些错误以及其他错误的信息,请参阅错误消息。