Skip to content

Commit

Permalink
Move TelemetryClient implementation into submodule
Browse files Browse the repository at this point in the history
This is required because Unity Package Manager expects the package.json to be at the root of the Package repository.
See https://docs.unity3d.com/Manual/cus-layout.html
  • Loading branch information
conath committed Dec 4, 2021
1 parent 46c0594 commit f3fc974
Show file tree
Hide file tree
Showing 19 changed files with 14 additions and 1,005 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "TelemetryClient/Assets/TelemetryClient"]
path = TelemetryClient/Assets/TelemetryClient
url = https://github.com/conath/TelemetryClient-for-UnityCSharp.git
73 changes: 10 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,81 +1,28 @@
# TelemetryClient for Unity
# TelemetryClient for Unity (Development project)

## Lightweight Analytics That's Not Evil

Please visit [TelemetryDeck.com](https://telemetrydeck.com/) to learn more.

## About this repository

This repository contains the TelemetryDeck Unity C# Client, as well as an example usage of the API (see [TestApp](/TelemetryClient/Assets/TestApp/) folder).
This repository contains the development project for the TelemetryDeck Unity C# Client, as well as an example usage of the API (see [TestApp](/TelemetryClient/Assets/TestApp/) folder).

## Dependenies
To add the Unity C# TelemetryClient to your project, please visit the [TelemetryClient for Unity C#](https://github.com/conath/TelemetryClient-for-UnityCSharp/) repository.

As TelemetryClient relies on JSON Serialization of Dictionaries, the JsonUtility built into Unity is not sufficient.
## Dependencies

Please add either [Json.NET for Unity](https://github.com/jilleJr/Newtonsoft.Json-for-Unity) (preferred) or [Newtonsoft.JSON](https://github.com/JamesNK/Newtonsoft.Json) to your project. We recommend you install Json.NET for Unity via Unity Package Manager.
Please see the [TelemetryClient README](https://github.com/conath/TelemetryClient-for-UnityCSharp).

<details>
<summary>How to add Json.Net for Unity via Unity Package Manager</summary>
## Cloning

First add the jilleJr Scoped Registry to your Unity Project settings:
You must clone with submodules to receive a working Unity Project:

![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.](https://github.com/conath/TelemetryDeck-Unity/raw/test-upm/HowToAddJilleJRScopedRegistry.jpg)
`git clone https://github.com/conath/TelemetryDeck-Unity.git --recurse-submodules`

The jilleJr Scoped Registry: Name "Packages from jillejr", URL "https://npm.cloudsmith.io/jillejr/newtonsoft-json-for-unity/" and Scopes "jillejr".
or, with SSH:

After you've added the registry, you can proceed with the next section, [Installing with Unity Package Manager](#installing-with-unity-package-manager) (Json.NET will automatically be installed).

</details>

You can alternatively edit your Project's `Packages/manifest.json` file directly.

<details>
<summary>How to add Json.Net for Unity by editing manifest.json</summary>
Add the following to the end of the dependencies array:

```json
"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:

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

Otherwise, add this into the `scopedRegistries` array:

```json
,
{
"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](https://github.com/jilleJr/Newtonsoft.Json-for-Unity/wiki/Installation-via-UPM).

</details>

## Installing with Unity Package Manager

TelemetryClient is available with Unity Package Manager. Simply install the [dependencies](#dependencies), then add [this URL](/TelemetryClient/Assets/TelemetryClient/) to Unity. (TODO is this how it works?)

## Installing (alternative Unity Package)

You may alternatively download the latest [Unity Package release](/releases) and import it into your project.
Note that you also need to add the Json.NET for Unity or Newtonsoft.JSON dependency to your project - see previous section.
`git clone git@github.com:conath/TelemetryDeck-Unity.git --recurse-submodules`

## License

Expand Down
1 change: 1 addition & 0 deletions TelemetryClient/Assets/TelemetryClient
Submodule TelemetryClient added at 2c2974
47 changes: 0 additions & 47 deletions TelemetryClient/Assets/TelemetryClient/CreateUserHashJob.cs

This file was deleted.

11 changes: 0 additions & 11 deletions TelemetryClient/Assets/TelemetryClient/CreateUserHashJob.cs.meta

This file was deleted.

38 changes: 0 additions & 38 deletions TelemetryClient/Assets/TelemetryClient/LICENSE.md

This file was deleted.

7 changes: 0 additions & 7 deletions TelemetryClient/Assets/TelemetryClient/LICENSE.md.meta

This file was deleted.

143 changes: 0 additions & 143 deletions TelemetryClient/Assets/TelemetryClient/Signal.cs

This file was deleted.

11 changes: 0 additions & 11 deletions TelemetryClient/Assets/TelemetryClient/Signal.cs.meta

This file was deleted.

Loading

0 comments on commit f3fc974

Please sign in to comment.