https://github.com/applejag/Newtonsoft.Json-for-Unity/wiki/Install-official-via-UPM
Install official via UPM
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!
com.unity.nuget.newtonsoft-json@1.0:
❌ "This is an internal Unity tool and is not supported."
(based on Newtonsoft.Json NuGet v12.0.1, hence the package name)com.unity.nuget.newtonsoft-json@2.0:
❌ "This is a package intended for internal Unity Development Projects and as such this package is not supported. Use at your own risk."
(based on jilleJr/Newtonsoft.Json-for-Unity v12.0.101)com.unity.nuget.newtonsoft-json@3.0:
✅ Fully intended and supported for public use!
(based on jilleJr/Newtonsoft.Json-for-Unity v13.0.102)
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.
Requires Unity Editor
2019.1
or aboveUninstalling 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.
Step 1: Open Package Manager (UPM) window
Step 2: Click add package
Step 3: Click "Add package by name"
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.Step 4: Enter
com.unity.nuget.newtonsoft-json
as package name, and3.0.1
as version (Or find latest version here)Done!
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
No hay comentarios:
Publicar un comentario