Please visit TelemetryDeck.com to learn more.
This repository contains the TelemetryDeck SDK for Unity C#. You can install the SDK from this repository using Unity Package Manager (instructions below). For sample code and additional documentation, please visit the TelemetryDeck SDK example repository.
As the TelemetryDeck SDK relies on JSON Serialization of Dictionaries, the JsonUtility built into Unity is not sufficient.
Please add either Json.NET for Unity (preferred) or Newtonsoft.JSON to your project. We recommend you install Json.NET for Unity via Unity Package Manager.
How to add Json.Net for Unity via Unity Package Manager
First add the jilleJr Scoped Registry to your Unity Project settings:
The jilleJr Scoped Registry: Name "Packages from jillejr", URL "https://npm.cloudsmith.io/jillejr/newtonsoft-json-for-unity/" and Scopes "jillejr".
After you've added the registry, you can proceed with the next section, Installing with Unity Package Manager (Json.NET will automatically be installed).
You can alternatively edit your Project's Packages/manifest.json
file directly.
How to add Json.Net for Unity by editing manifest.json
Add the following to the end of the dependencies array: "jillejr.newtonsoft.json-for-unity": "13.0.102"
If your manifest doesn't already include a scopedRegistries
key, add this before the last }
in the file:
"scopedRegistries": [
{
"name": "Packages from jillejr",
"url": "https://npm.cloudsmith.io/jillejr/newtonsoft-json-for-unity/",
"scopes": [
"jillejr"
]
}
]
Otherwise, add this into the scopedRegistries
array:
,
{
"name": "Packages from jillejr",
"url": "https://npm.cloudsmith.io/jillejr/newtonsoft-json-for-unity/",
"scopes": [
"jillejr"
]
}
The Json.NET for Unity Wiki provides further instructions on installing their package via UPM.
TelemetryDeck SDK is available in Unity Package Manager. Simply install the dependencies, then add the package to Unity from the git URL of this repository:
- Copy the URL
- Open Unity Package Managager in your project (menu Window => Package Manager)
- Click on the Plus
+
icon in the top left and choose "Add package from git URL…" - Paste the URL
- Click "Add"
If you added the dependencies correctly, Unity will show "Please wait, installing a GIT package…". The package will appear in the list after it finishes installing.
If you did not add the dependencies correctly, Unity will show a few errors in the Console window:
[Package Manager Window] Unable to add package https://github.com/TelemetryDeck/UnityCSharpSDK.git:
Package com.telemetrydeck.unitycsharpclient@https://github.com/TelemetryDeck/UnityCSharpSDK.git has invalid dependencies or related test packages:
jillejr.newtonsoft.json-for-unity (dependency): Package [[email protected]] cannot be found
Please follow the instructions in the Dependencies section to fix this.
You may alternatively download the latest Unity Package release and import it into your project. This is not recommended, as you will not receive updates in Unity. Make sure to watch the releases for this repository to be notified.
The the dependencies are required when using the Unity Package method of installing TelemetryClient, however you do not have to use Unity Package Manager to do this.
TelemetryDeck SDK for Unity C# is licensed unter a MIT No Attribution License.
This means you can use the Unity Package or source code in your projects without including the license text.
Of course, attribution is very much appreciated. <3
This project uses the Newtonsoft.Json for Unity package (aka Json.NET), which is licensed unter The MIT License.