# Creator Companion and Package Manager Guide

A guide for using VRChat Creator Companion and authoring packages compatible with VRChat Package Manager

# Terminology

<p id="bkmrk-%22vcc%22%2C-%22vpm%22%2C-%22repo%22"><em>"VCC", "VPM", "Repo", "Package"?</em> - This page is for giving you an overview of what everything means</p>
<details id="bkmrk-vrchat-creator-compa">
<summary>VRChat Creator Companion (VCC)</summary>
<p>Standalone application developed by VRChat for managing Unity projects for world and avatar creation and the packages in those projects: <a href="https://vcc.docs.vrchat.com/" target="_blank" rel="noopener">https://vcc.docs.vrchat.com/</a></p>
<p>Creator Companion also includes sections for accessing learning material and other tools developed by VRChat.</p>
<p><a href="https://vrclibrary.com/wiki/uploads/images/gallery/2022-10/uILimage.png" target="_blank" rel="noopener"><img src="https://vrclibrary.com/wiki/uploads/images/gallery/2022-10/scaled-1680-/uILimage.png" alt="image.png"></a></p>
</details><details id="bkmrk-vrchat-package-manag">
<summary>VRChat Package Manager (VPM)</summary>
<p>Core feature of VRChat Creator Companion for managing VPM packages in your projects (VRCSDK, ClientSim, UdonSharp, etc.)</p>
<p><a href="https://vcc.docs.vrchat.com/vpm/" target="_blank" rel="noopener">https://vcc.docs.vrchat.com/vpm/</a></p>
</details><details id="bkmrk-repository-listing-%2F">
<summary>Repository Listing / Repo</summary>
<p>JSON file which contains a list of packages and available versions for VRChat Package Manager to download and add into a project.</p>
<p>Repository listings are used to receive information new versions for packages.</p>
<p><a href="https://vcc.docs.vrchat.com/vpm/repos" target="_blank" rel="noopener">https://vcc.docs.vrchat.com/vpm/repos</a></p>
</details><details id="bkmrk-creationinfo-the-rep">
<summary>CreationInfo</summary>
<p>The repository listing stub JSON for initializing the full repository listing file.</p>
<p>Example:</p>
<pre><code class="language-json">{
  "CreationInfo": {
    "url": "https://vpm.varneon.com/editor-extensions"
  }
}</code></pre>
<p class="callout info">CreationInfo property containing the URL which points to the full repository listing is the only thing required to be present in the JSON file in VRChat Creator Companion's appdata folder in order to create the full listing</p>
</details><details id="bkmrk-vpm-package-a-packag">
<summary>VPM Package</summary>
<p>A package used to add assets into a project for world or avatar creations.</p>
<p>Based on <a title="https://docs.unity3d.com/2019.4/Documentation/Manual/Packages.html" href="https://docs.unity3d.com/2019.4/Documentation/Manual/Packages.html" target="_blank" rel="noopener">Unity Package Manager</a> packages with <a title="https://vcc.docs.vrchat.com/vpm/packages#vpm-manifest-additions" href="https://vcc.docs.vrchat.com/vpm/packages#vpm-manifest-additions" target="_blank" rel="noopener">few additions</a> for added functionality specific to VPM.</p>
<p>Generally identified by the <a title="https://docs.unity3d.com/Manual/cus-naming.html" href="https://docs.unity3d.com/Manual/cus-naming.html" target="_blank" rel="noopener">UPM compatible name</a>&nbsp;<em>(e.g. "com.vrchat.udonsharp")</em>, not to be mixed with the Display Name, which is the user-friendly name for viewing the package in Package Manager window or Creator Companion.</p>
</details><details id="bkmrk-package-manifest-%28pa">
<summary>Package Manifest (package.json)</summary>
<p>A JSON file for managing information about a UPM/VPM package: <a href="https://docs.unity3d.com/Manual/upm-manifestPkg.html" target="_blank" rel="noopener">https://docs.unity3d.com/Manual/upm-manifestPkg.html</a></p>
<p class="callout info">The package manifest is the only file required to be present in order to add it into a project using Unity Package Manager</p>
</details><details id="bkmrk-local-user-package-a">
<summary>Local User Package</summary>
<p>A package that a user has manually downloaded in form of the r/aw package contents and linked to VRChat Creator Companion:</p>
<p><a href="https://vrclibrary.com/wiki/uploads/images/gallery/2022-10/p5Bimage.png" target="_blank" rel="noopener"><img src="https://vrclibrary.com/wiki/uploads/images/gallery/2022-10/scaled-1680-/p5Bimage.png" alt="image.png"></a></p>
<p>Local user packages can be added to a project by selecting <strong>"Local User Packages"</strong> in the repository listing dropdown:</p>
<p><a href="https://vrclibrary.com/wiki/uploads/images/gallery/2022-10/Axgimage.png" target="_blank" rel="noopener"><img src="https://vrclibrary.com/wiki/uploads/images/gallery/2022-10/scaled-1680-/Axgimage.png" alt="image.png"></a></p>
<p><a href="https://vcc.docs.vrchat.com/vpm/packages#user-packages" target="_blank" rel="noopener">https://vcc.docs.vrchat.com/vpm/packages#user-packages</a></p>
</details>
<p id="bkmrk-"><br><br></p>

# 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>

# VPM Package Authoring

How to author packages compatible with VRChat Package Manager