> ## 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.

# Compatibility Adapter

> Use the separate adapter package to connect legacy Unity/.NET server SDK-style code to a HyperX project.

The compatibility adapter is a separate package for projects that need to keep existing `BackEnd` namespace-style game code while routing calls to HyperX Core. New projects should use the canonical HyperX SDK with `HyperX.Core` and `PlayerSession`.

## Package Contents

Put both DLLs in Unity `Assets/Plugins`.

* `HyperX.BackndCompatible.netstandard2.1.dll`
* `HyperX.netstandard2.1.dll`

The adapter calls the canonical HyperX SDK internally. Game code can keep the `BackEnd` namespace, but the runtime still needs the base HyperX DLL.

## Initialization

```cs theme={null}
using BackEnd;

var init = Backend.Initialize(new BackendCustomSetting
{
    clientAppID = "PROJECT_CODE",
    timeOutSec = 10
});

if (!init.IsSuccess())
{
    UnityEngine.Debug.LogError(init.ToString());
}
```

Set `clientAppID` to the project code from HyperX Console.

## Login And Data

```cs theme={null}
var login = Backend.BMember.CustomLogin("player-id", "password");

var param = new Param();
param.Add("gold", 1200);
param.Add("stage", 3);

var saved = Backend.PlayerData.UpdateMyLatestData("save_state", param);
var loaded = Backend.PlayerData.GetMyData("save_state");
var gold = (int)loaded.FlattenRows()[0]["gold"];
```

`Param.AddCalculation` works on update calls by reading the existing row, applying the calculation, and writing the row back.

```cs theme={null}
var delta = new Param();
delta.AddCalculation("gold", CalculationType.Add, 50);
Backend.PlayerData.UpdateMyLatestData("save_state", delta);
```

## Supported Areas

The adapter covers initialization, member login, user info, nickname, token refresh, logout, current-user data CRUD, shared-data reads, chart/config lookup, probability, rankings, coupons, mail, notices/events/policies, push devices, guilds, and support inquiries.

Calls that cannot be represented safely return a `BackendReturnObject` with `UnsupportedOperation`.

## Build

To create a local Unity-ready package:

```bash theme={null}
cd dotnet-sdk-backnd-compatible
make package
```

The generated zip contains the DLL bundle for Unity `Assets/Plugins` and a smoke sample.
