Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Installation via UPM

Kalle Jillheden edited this page May 5, 2020 · 4 revisions

Unity Package Manager, or UPM for short, is Unity's new solution for managing packages so they don't need to be included inside the /Assets folder.

Have a look at the Unity Package Manager docs for more info.

Like many other similar systems (such as NPM, NuGet, Maven), you only reference the package name (and optionally from which registry to find it). The benefit of this is that you can safely push your list of package references to your version control system of choice (git, mercury, TFS), without having to push the entire list of binaries. Saving a lot of duplicated binaries and annoying updating procedures in the process.

Have a look at the Unity Package Manager docs for more info.

Prerequisites

  1. Requires Unity Editor 2018.1 or above, as UPM was first shipped with 2018.1.

Installing the package

Open <project>/Packages/manifest.json, add scope for jillejr, then add the package in the list of dependencies.

À la:

{
  "scopedRegistries": [
    {
      "name": "Packages from jillejr",
      "url": "https://npm.cloudsmith.io/jillejr/newtonsoft-json-for-unity/",
      "scopes": ["jillejr"]
    }
  ],
  "dependencies": {
    "jillejr.newtonsoft.json-for-unity": "12.0.201",

    // ...
  }
}

// ... signals the rest of the packages you have in the manifest.json, such as all the "com.unity.*" dependencies

Updating the package

Updating via the UI

Open the Package Manager UI Window > Package Manager

preview of where window button is

Followed by pressing the update button on the jillejr.newtonsoft.json-for-unity package

preview of update button

Updating manually via the manifest file

(This is an alternative for updating. Following the guide above will suffice if your Package Manager is functional)

Change the version field. You will have to know the new version beforehand. You can find the version here: https://github.com/jilleJr/Newtonsoft.Json-for-Unity/releases

Example, with this as old:

{
  "scopedRegistries": [
    {
      "name": "Packages from jillejr",
      "url": "https://npm.cloudsmith.io/jillejr/newtonsoft-json-for-unity/",
      "scopes": ["jillejr"]
    }
  ],
  "dependencies": {
    "jillejr.newtonsoft.json-for-unity": "12.0.101",

    // ...
  }
}

New, updated:

{
  "scopedRegistries": [
    {
      "name": "Packages from jillejr",
      "url": "https://npm.cloudsmith.io/jillejr/newtonsoft-json-for-unity/",
      "scopes": ["jillejr"]
    }
  ],
  "dependencies": {
    "jillejr.newtonsoft.json-for-unity": "12.0.201",
                                               ^ change here

    // ...
  }
}

// ... signals the rest of the packages you have in the manifest.json, such as all the "com.unity.*" dependencies

Clone this wiki locally