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

# Introducing (Beta)

The Gleap SDK for Unity is the easiest way to integrate Gleap into your games and real-time apps. Communicate with your users directly and build better software by discovering their everyday pain points. Gleap is your all-in-one customer feedback tool for apps and websites.

For the SDK to work, you need an API key, which you can get for free at [app.gleap.io](https://app.gleap.io).

#### Supported platforms

| ✅ Standalone / Mobile (via a WebView plugin) | ✴️ WebGL (via the [JavaScript SDK](../javascript/README)) |
| -------------------------------------------- | --------------------------------------------------------- |

<Info>
  **Beta.** The Gleap C# SDK is published as a pre-release (`0.1.0-beta.1`). Expect the odd
  change before the stable `1.0` release.
</Info>

## 🏗 Installation

The Unity binding ships as the UPM package **`com.gleap.sdk`** (it reuses the shared `Gleap.Core` engine, whose DLLs are bundled under `Runtime/Plugins/`). Unity supplies persistence (`PlayerPrefs`), device metadata (`SystemInfo`) and console-log capture; you supply a WebView channel that renders the widget.

### Requirements

* **Unity** with the [Newtonsoft Json](https://docs.unity3d.com/Packages/com.unity.nuget.newtonsoft-json@latest) package (declared as a dependency).
* A **WebView plugin** for Standalone/Mobile (e.g. [Vuplex 3D WebView](https://developer.vuplex.com/)).

### Add the package

In Unity open **Package Manager → Add package from git URL…** and enter:

```
https://github.com/GleapSDK/CSharp-SDK.git?path=/unity/com.gleap.sdk#v0.1.0-beta.1
```

`Gleap.Core.dll` and its dependencies are bundled under `Runtime/Plugins/`. If Unity reports duplicate framework facades on import, delete those specific DLLs and keep `Gleap.Core.dll`, `System.Text.Json.dll`, `System.Text.Encodings.Web.dll`, `Microsoft.Bcl.AsyncInterfaces.dll` and `System.IO.Pipelines.dll`.

### Configure the SDK

Bring your own WebView, route its page→native messages into a `GleapUnityWebViewChannel`, then attach Gleap:

```csharp theme={null}
using GleapSDK;
using GleapSDK.Unity;

var channel = new GleapUnityWebViewChannel(js => myWebView.ExecuteJavaScript(js));
await GleapUnity.AttachAsync(channel, "YOUR_SDK_KEY"); // IL2CPP-safe Newtonsoft serializer by default
Gleap.Open();

// Optional: add GleapUnityLogHook to a persistent GameObject to capture Debug.Log output.
```

Once attached, drive Gleap from anywhere via the stable static facade (`Gleap.StartConversation()`, `Gleap.TrackEvent(...)`, …).

Congratulations 🎉 You are all set 👋

## Platform notes

* Unity has **no built-in WebView** — use `GleapUnityWebViewChannel` together with a commercial WebView plugin on Standalone/Mobile.
* On **WebGL**, the widget frame is a cross-origin iframe you cannot inject into — front the existing [Gleap JavaScript SDK](../javascript/README) from a `.jslib` instead of this managed channel.
* The default **Newtonsoft** serializer is IL2CPP-safe; a `link.xml` protects the Gleap DTOs from AOT stripping.

## 🤝 Need help?

We are here to help! [hello@gleap.io](mailto:hello@gleap.io)
