> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperx.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Unity Samples

> Run the main SDK flows from Unity sample scripts.

Unity samples help you confirm SDK connectivity and learn feature call order. Replace project codes, table keys, ranking keys, and coupon codes with values from your own project.

## Included Flows

| Sample                     | Flow                                                 |
| -------------------------- | ---------------------------------------------------- |
| `HyperXBootstrapSample.cs` | SDK initialization, guest login, current user lookup |
| `HyperXDataSample.cs`      | Shared data and user data                            |
| `HyperXLiveOpsSample.cs`   | Rankings, coupons, game logs, operation content      |
| `HyperXSocialSample.cs`    | Mail, user search, notifications                     |
| `HyperXChatSample.cs`      | Chat channel creation, subscription, message send    |

## Run Order

1. Create a project in Console and copy the project code.
2. Create the shared data, ranking, coupon, and operation content used by the sample.
3. Place the HyperX SDK DLL under `Assets/Plugins`.
4. Add the sample script under `Assets/Scripts` and attach it to a GameObject.
5. Enter the project code and keys, then run the scene.

```cs theme={null}
await HyperX.Core.Init(projectCode);

var player = await HyperX.Core.Users.StartGuestSession(
    SystemInfo.deviceUniqueIdentifier,
    country: "US",
    language: "en"
);
```

Samples use `PlayerSession` helpers by default. Authenticated flows such as user data, rankings, coupons, notifications, and chat call `player.PutUserData(...)`, `player.SubmitRanking(...)`, and `player.Notifications(...)` without passing access tokens into every method.

If a sample fails, first check that required Console data is published, then review `ErrorCode`, `TraceId`, and `RequestId` in the logs.
