Code Monkey home page Code Monkey logo

unitycsharpsdk's Introduction

TelemetryDeck SDK for Unity C#

Lightweight Analytics That's Not Evil

Please visit TelemetryDeck.com to learn more.

About this repository

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.

Dependencies

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:

Click on Window, Package Manager. Click the Gear icon, then Advanced Project Settings. In the Project Settings window that opens, fill in the details for the jilleJr scoped registry (follows below). Click Save.

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.

Installing with Unity Package Manager

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:

  1. Copy the URL
  2. Open Unity Package Managager in your project (menu Window => Package Manager)
  3. Click on the Plus + icon in the top left and choose "Add package from git URL…"
  4. Paste the URL
  5. 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.

Installing manually from Unity Package

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.

License

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

3rd Party Licenses

This project uses the Newtonsoft.Json for Unity package (aka Json.NET), which is licensed unter The MIT License.

unitycsharpsdk's People

Contributors

conath avatar winsmith avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mistial-dev

unitycsharpsdk's Issues

Check if we can get by without depending on jilleJR?

From a user:

Using the package manager to install requires the jilleJr version. It's probably better but I cannot use this version as other plugins I use rely on components that aren't in jilleJr's version of the plugin. Would be good to offer a package manager version that doesn't have this as a dependancy

Add Testing Mode feature (from Swift SDK 1.1.5)

See https://github.com/TelemetryDeck/SwiftClient/releases/tag/1.1.5

Previously, when you ran your app locally with the Build Configuration set to DEBUG, TelemetryManager would not send any signals at all. This is because otherwise these testing signals would pollute your actual data, which is not something we desire. However, that made it hard to test wether your configuration actually works, and to prepare reasonable Insights before your launch.

This is why we're introducing Testing Mode. When you run your app in the DEBUG Build Configuration, i.e. directly from Xcode, TelemetryManager will now send all signals, but tag them as Testing Mode signals. In an upcoming version of the app, you will be able to see those signals separately, so you can immediately confirm that your code is working correctly without polluting the actual data.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.