# VPM Package

# Package Manifest

# VPM Package Manifest

Package manifest is a JSON file contained at the root of the package and is used to define the properties of the package, such as name, version, author, dependencies, etc.

## UPM Properties

> Unity UPM package manifest documentation: https://docs.unity3d.com/Manual/upm-manifestPkg.html

| Property | JSON Type | Description |
| - | - | - |
| `name` <span style="color:red">*</span> | String | The officially registered package name. <span style="color:grey">*(e.g. com.vrchat.udonsharp)*</span> |
| `version` <span style="color:red">*</span> | String | The package version number. [Documentation](https://docs.unity3d.com/Manual/upm-semver.html) |
| `displayName` | String | User-friendly name displayed in [VRChat Creator Companion](https://vcc.docs.vrchat.com/), [Unity Package Manager](https://docs.unity3d.com/2019.4/Documentation/Manual/upm-ui.html) and [Project Window](https://docs.unity3d.com/2019.4/Documentation/Manual/ProjectView.html)
| `description` | String | Brief description of the package |
| `author` | Object | The author of the package.<br/><br/>`name` <span style="color:red">\*</span> - Name of the author<br/>`email` - Email of the author<br/>`url` - URL to author's page <span style="color:grey">*(e.g. GitHub, GitLab, Booth)*</span> |
| `unity` | String | Lowest compatible Unity version version for this package, e.g. `2019.4`. <span style="color:grey">*(In case of VPM packages, recommended to set to current version used by VRChat.)*</span> |
| `unityRelease` | String | Lowest compatible release of the Unity version defined in `unity`, e.g. `29f1` |
| `dependencies` | Object | A map of package dependencies. Keys are package names, and values are specific versions. They indicate other packages that this package depends on.<br/><br/>**Note:** The Package Manager doesn’t support range syntax, only [SemVer](https://semver.org/) versions. |
| `keywords` | String[] | An array of keywords used by the Package Manager search APIs. This helps users find relevant packages. |
| `samples` | Object[] | List of samples included in the package. Each sample contains a display name, a description, and the path to the sample folder starting at the Samples~ folder itself. |
| `license` | String | Identifier for an OSS license using the [SPDX identifier format](https://spdx.org/licenses/), or a string such as *“See LICENSE.md file”*. | 
| `licensesUrl` | String | Custom location for this package’s license information specified as a URL. |
| `changelogUrl` | String | Custom location for this package’s changelog specified as a URL. |
| `documentationUrl` | String | Custom location for this package’s documentation specified as a URL. |

<span style="color:red">*</span> - Property required by UPM

<details><summary><code>Example package.json</code></summary>

```json
{
    "name": "com.varneon.vpm-test-package",
    "displayName": "VPM Test Package",
    "version": "1.0.1",
    "unity": "2019.4",
    "unityRelease": "29f1",
    "description": "Test package for VPM.",
    "author": {
        "name": "Varneon",
        "email": "developer@varneon.com",
        "url": "https://github.com/Varneon"
    },
    "documentationUrl": "https://example.com/documentation.html",
    "changelogUrl": "https://example.com/changelog.html",
    "licensesUrl": "https://example.com/licensing.html",
    "license": "MIT",
    "keywords": [
        "vpm",
        "vrchat",
        "udon"
    ],
    "dependencies": {
        "com.vrchat.worlds": "3.1.9"
    },
    "samples": [
        {
            "displayName": "My Sample",
            "description": "Sample from the test package.",
            "path": "Samples~/MySample"
        }
    ]
}
```

</details>

## VPM Additions

> VPM manifest additions documentation: https://vcc.docs.vrchat.com/vpm/packages/#vpm-manifest-additions

| Property | JSON Type | Description |
| - | - | - |
| `url` <span style="color:red">*</span> | String | Direct download link to a zip file for a version of the package defined in the manifest <span style="color:grey">*(Typically appended by automated system, e.g. GitHub Action for repository listing)*</span> |
| `vpmDependencies` | Object | VPM-based dependencies your package requires. <span style="color:grey">*(Dependencies are required to be available in the repository listings in your Creator Companion)*</span>. |
| `legacyFolders` | Object | Path-GUID properties for defining folders in the Assets directory used by old .unitypackage-based versions of this package. Matching folders will be removed when importing the new VPM package. <span style="color:grey">*(If no GUID is provided, only path will be matched)*</span>. |
| `legacyFiles` | Object | Same as `legacyFolders` above, but for files. |

<span style="color:red">*</span> - Property required by VPM

<details><summary><code>Example package.json</code></summary>

```json
{
    "url" : "https://packages.vrchat.com/com.vrchat.avatars-3.1.0.zip",
    "vpmDependencies" : {
        "com.vrchat.avatars" : "3.1.0"
    },
    "legacyFolders" : {
      "Assets\\FolderName" : "vr031f928e5c709x9887f6513084aaa51"
    },
    "legacyFiles" : {
      "ProjectVersion.txt" : "jf988739jfdskljf098323jjhf"
    }
}
```

</details>