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

# Unreal Engine SDK

> Install the Dashlink Unreal plugin, forward live links, and recover the original content after a store install.

The Unreal plugin calls the [Android](https://docs.dashlink.ai/guides/app-dynamic-links/android.md) and [iOS](https://docs.dashlink.ai/guides/app-dynamic-links/ios.md) SDKs on Android and iOS packaged builds. It works with Unreal Engine 4 and 5 mobile exports. Editor, Windows, macOS, and console builds return an empty link. Play Install Referrer and Universal Links do not exist there.

The plugin covers Dashlink live-link forwarding and deferred first-open recovery on Android and iOS packaged builds.

## When you need the SDK

| You have | Use |
| - | - |
| App installed, Dynamic Link host declared, OS verified | Forward the OS URL into `HandleUniversalLink`. |
| First open after a store install from a Dynamic Link | Call `GetDynamicLink` at startup on a device package. |
| Editor or desktop | `IsMobilePlatform()` is false. The callback receives an empty link. |

Android `GetDynamicLink` reads the current activity intent and, on first open, Play Install Referrer. iOS `GetDynamicLink` is only the pasteboard check. A live Universal Link on iOS must go through `HandleUniversalLink`.

## Install

Copy `dashlink-unreal` into the project's `Plugins` folder and enable **Dashlink**. The Android package also needs `ai.dashlink:dashlink-android` on the Gradle classpath so `DashlinkUnreal.java` can call it. The iOS package needs the Dashlink framework so `DashlinkUnrealBridge.mm` can import it.

## Dynamic Link API key

```cpp theme={null}
UDashlink::Configure(TEXT("dlk_sdk_…"));
UDashlink::SetDynamicLinkHosts({ TEXT("yourbrand.dshl.in") });
```

Create the key in Settings → API Keys → Type **Dynamic Link**. REST keys (`dlk_live_`) are rejected. `SetDynamicLinkHosts` is required. An empty list lets any https URL with a back-half through.

## Association

Declare the Dynamic Link host in the Android manifest (`autoVerify`) and in the iOS Associated Domains entitlement. The plugin cannot invent OS intercept. See [App association](https://docs.dashlink.ai/guides/app-dynamic-links/app-association.md).

## Live taps and deferred first open

`ADashlinkSampleActor` configures, sets the host, and calls `GetDynamicLink` from `BeginPlay`. `ForwardOpenUrl` sends a live URL into `HandleUniversalLink`.

The callback receives `FDashlinkPendingLink`: `AppUrl`, `DestinationUrl`, `FallbackUrl`, `ClickId`, `bDeferred`, `MatchType`, `Outcome`, UTM fields, and `ShortUrl`.

An installed tap records `app_open`. A recovered store install records `deferred_open` joined to that `click_id`. A miss is consumed once.

## Tracking

The store redirect is the click. The plugin does not add a second click. Campaign totals should unique-count by `click_id`.

## Test on a device

**1. Uninstall the app**

A previous install will not re-run deferred recovery.

**2. Tap a Dynamic Link**

The device should reach the store.

**3. Install an Android or iOS package**

Editor PIE does not resolve links.

**4. Open the app**

First open must land on `AppUrl`, and analytics must show `deferred_open` for the same `click_id`.

## Source

The plugin and the `ADashlinkSampleActor` example live in the [`dashlink-unreal`](https://github.com/Dashlink-ai/dashlink-unreal) repo, under `Source/`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.