Version: 2019.2
Accessing package Assets


When Unity loads a Project, the Unity Package Manager reads the Project manifest so that it can compute a list of which packages to load. When a user installs or uninstalls a package through the Package Manager window, the Package Manager stores those changes in the Project manifest file. The Project manifest file manages the list of packages through the dependencies object.

In addition, the Project manifest serves as a configuration file for the Package Manager. It stores the location of one or more package registries. For Git packages, it also provides a lock object defining a commit hash and revision number to guarantee that the Package Manager always installs exactly the same dependencies.

You can find the Project manifest file, called manifest.json, in the Packages folder under the root folder of your Unity Project. Like the package manifest file, the Project manifest file uses JSON (JavaScript Object Notation) syntax.


All attributes are optional. However, if your Project manifest file does not contain any values, the Package Manager window doesn’t load, and the Package Manager doesn’t load any packages.

TIP: At any time, you can fix any problems with your registry by choosing Reset packages to defaults from the main Unity Help menu. However, be aware that this action resets all changes you made to the packages in your Project so it is best to use this strategy as a last resort.

JSON 类型 描述
dependencies 对象 项目中可用包的列表。清单中的此条目使用映射结构列出与项目所需版本关联的包名称


registry String Unity Package Manager 主注册表的 URL。这将覆盖默认的注册表 URL (。

注意:如果您用自己的注册表覆盖默认注册表,则会失去对官方 Unity 包的访问权限。但如果您想使用自己的私有包集合来扩充 Unity 包库,请设置 scopedRegistries 属性以改用某一范围内的注册表。
scopedRegistries 对象数组 指定除了默认注册表之外的自定义注册表。这样允许您托管自己的包。

lock 对象 用提交哈希和所选修订版本描述 Git 包解析信息。Package Manager 将自动更新此属性。这样可以保证 Package Manager 安装完全相同的依赖项。

该属性是为 Git 包保留的属性,但是其他功能未来可能会使用该属性,以保证确定性的包版本解析。
testables 字符串数组 Lists the package names that you want to include in the Unity Test Framework. For more information, see Adding tests to a package.


  "registry": "",
  "scopedRegistries": [{
    "name": "My internal registry",
    "url": "",
    "scopes": [
  "dependencies": {
    "com.unity.package-1": "1.0.0",
    "com.unity.package-2": "2.0.0",
    "com.unity.package-3": "3.0.0",
    "": "file:/path/to/",
    "": "https://my.repository/my-package.git#v1.2.3"
  "lock": {
    "": {
       "hash": "9e72f9d5a6a3dadc38d813d8399e1b0e86781a49",
       "revision": "v1.2.3"
  "testables": [ "com.unity.package-1", "com.unity.package-2" ]
Accessing package Assets
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。