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

Install official via UPM

kalle (jag) edited this page Mar 3, 2022 · 3 revisions

Since late February 2022, Unity's fork of this repo is now well maintained and has gone from being declared as "development package, for Unity internal use only" over to an officially maintained package!

At the time of writing (2022-03-03), your Unity version either:

  • Already has this newer version installed, as some other Unity packages already depend on it. Should apply to Unity v2022 and above.

  • or it is hidden from your Package Manager window.

They do intend on making it publicly visible later, but you can install it manually by following this guide.

Prerequisites

  1. Requires Unity Editor 2019.1 or above

  2. Uninstalling my package, jillejr.newtonsoft.json-for-unity, as the two packages cannot coexist.

    It is fine however to keep using the converters package, jillejr.newtonsoft.json-for-unity.converters, if you're already doing so, as Unity does not provide an equivalent package.

Installing the package (via UPM window)

  1. Step 1: Open Package Manager (UPM) window
    step 1

  2. Step 2: Click add package
    step 2

  3. Step 3: Click "Add package by name"
    step 3

    If you are using an older Unity version you may not have the "Add package by name" option here. In this case, instead follow the guide on installing via manifest.json below.

  4. Step 4: Enter com.unity.nuget.newtonsoft-json as package name, and 3.0.1 as version (Or find latest version here)
    step 4

  5. Done!

Installing the package (via manifest.json)

Open <project>/Packages/manifest.json, then add the package com.unity.nuget.newtonsoft-json in the list of dependencies.

À la:

{
  "dependencies": {
    "com.unity.nuget.newtonsoft-json": "3.0.1",

    // ...
  }
}

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

Version 3.0.1 was the latest at the time of writing (2022-03-03). You can find latest version here: https://docs.unity3d.com/Packages/com.unity.nuget.newtonsoft-json@3.0/manual/index.html