Skip to content

Commit 5954d79

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 41ffc5b commit 5954d79

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

src/Packages/Audience/README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
Requires Unity 2021.3 or later. Works under Mono and IL2CPP.
16+
17+
## First event
18+
19+
```csharp
20+
using Immutable.Audience;
21+
using UnityEngine;
22+
23+
public static class Analytics
24+
{
25+
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
26+
private static void Init()
27+
{
28+
ImmutableAudience.Init(new AudienceConfig
29+
{
30+
PublishableKey = "YOUR_PUBLISHABLE_KEY",
31+
Consent = ConsentLevel.Anonymous,
32+
DistributionPlatform = DistributionPlatforms.Steam,
33+
Debug = true,
34+
});
35+
36+
ImmutableAudience.Track(new Purchase { Currency = "USD", Value = 9.99m });
37+
}
38+
}
39+
```
40+
41+
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.
42+
43+
## Documentation
44+
45+
The full integration guide, API reference, event schemas, and troubleshooting live at:
46+
47+
- https://docs.immutable.com/docs/products/audience/unity-sdk
48+
49+
## License
50+
51+
See the repository [LICENSE](https://github.com/immutable/unity-immutable-sdk/blob/main/LICENSE.md).

0 commit comments

Comments
 (0)