Skip to content

Commit 1fef585

Browse files
docs(audience): add UPM-visible README for the Audience package (SDK-150)
Adds src/Packages/Audience/README.md so studios clicking the package in Unity Package Manager see install instructions, a working first-event snippet, and a link to the full integration guide on docs.immutable.com.
1 parent 740656c commit 1fef585

2 files changed

Lines changed: 55 additions & 1 deletion

File tree

src/Packages/Audience/README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Immutable Audience
2+
3+
Typed C# tracking SDK for Unity games. Captures `game_launch`, `session_start` / `session_heartbeat` / `session_end` automatically; predefined events (`Progression`, `Resource`, `Purchase`, `MilestoneReached`) and custom events on demand.
4+
5+
> **Status:** alpha. APIs and behavior may change between releases.
6+
7+
## Install
8+
9+
In Unity, open **Window → Package Manager**, click **+ → Add package from git URL...**, and paste:
10+
11+
```
12+
https://github.com/immutable/unity-immutable-sdk.git?path=src/Packages/Audience#main
13+
```
14+
15+
For reproducible builds, replace `#main` with a release tag or a specific commit SHA.
16+
17+
Requires Unity 2021.3 or later. Works under Mono and IL2CPP.
18+
19+
## First event
20+
21+
```csharp
22+
using Immutable.Audience;
23+
using UnityEngine;
24+
25+
public static class Analytics
26+
{
27+
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
28+
private static void Init()
29+
{
30+
ImmutableAudience.Init(new AudienceConfig
31+
{
32+
PublishableKey = "YOUR_PUBLISHABLE_KEY",
33+
Consent = ConsentLevel.Anonymous,
34+
DistributionPlatform = DistributionPlatforms.Steam,
35+
Debug = true,
36+
});
37+
38+
ImmutableAudience.Track(new Purchase { Currency = "USD", Value = 9.99m });
39+
}
40+
}
41+
```
42+
43+
Press Play; `ImmutableAudience.Initialized` returns `true` and `AnonymousId` becomes a non-null GUID. The SDK warns to the Unity Console with prefix `[ImmutableAudience]` only on errors.
44+
45+
## Documentation
46+
47+
- Integration guide and API reference: <https://docs.immutable.com/docs/products/audience/unity-sdk>
48+
- Sample Unity project: [`examples/audience`](https://github.com/immutable/unity-immutable-sdk/tree/main/examples/audience)
49+
50+
## License
51+
52+
See the repository [LICENSE](https://github.com/immutable/unity-immutable-sdk/blob/main/LICENSE.md).

src/Packages/Audience/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@
55
"displayName": "Immutable Audience",
66
"author": {"name": "Immutable", "url": "https://immutable.com"},
77
"keywords": ["unity", "immutable", "audience", "analytics"],
8-
"unity": "2021.3"
8+
"unity": "2021.3",
9+
"documentationUrl": "https://docs.immutable.com/docs/products/audience/unity-sdk",
10+
"licensesUrl": "https://github.com/immutable/unity-immutable-sdk/blob/main/LICENSE.md"
911
}

0 commit comments

Comments
 (0)