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

# Getting Started

> Install and initialize DARO Unity SDK in your Unity project.

<Note>
  An Ad Unit defines an ad placement and format in your app. For the DARO 2.0 SDK, copy the **Ad Unit Key** from the updated dashboard. This is different from the app’s Integration Key. API parameters such as `adUnitId`, `unitId`, and `key`, and example placeholders such as `YOUR_AD_UNIT_ID`, keep their names but take that Ad Unit’s Ad Unit Key. Existing integrations using Ad Unit IDs remain supported. Do not confuse reporting or callback identifiers with the key for a new integration.
</Note>

## Before You Begin

Prepare these items before installing DARO Unity SDK:

* A per-platform Integration Key issued from the DARO dashboard
* Ad Unit Keys for each ad format
* Unity 2021.3 LTS or newer
* A build environment with Android Build Support or iOS Build Support installed

Complete the [app-ads.txt setup](/en/app-ads-txt-settings) as well.

<Note>
  Configure the SDK with an Integration Key for each platform. You do not need to enter separate app keys or key files.
</Note>

## Install SDK

Use `DaroPackageInstaller.unitypackage` for the recommended installation path.

<Steps>
  <Step title="Download Installer Package">
    Download [`DaroPackageInstaller.unitypackage`](https://github.com/delightroom/DaroUnitySDK/releases/download/sdk%2F1.0.0/DaroPackageInstaller.unitypackage) from the GitHub Release.
  </Step>

  <Step title="Import into Unity Project">
    In Unity Editor, select **Assets > Import Package > Custom Package**, then import `DaroPackageInstaller.unitypackage`.
  </Step>

  <Step title="Confirm Package Installation">
    The installer adds the OpenUPM scoped registry, EDM4U, and `so.daro.unity` dependency to `Packages/manifest.json`.

    The latest `so.daro.unity` package version is `1.0.0` and uses EDM4U `com.google.external-dependency-manager@1.2.187`.

    Unity shows an **`Importing a scoped registry`** notice during installation. It is Unity's own note that the OpenUPM registry was added — click **Close**.
  </Step>

  <Step title="Run Integration Manager">
    In the Unity Editor menu bar, open **Daro > Integration Manager** and validate your project setup. `Daro` is a **top-level menu**, not an entry under `Assets`.
  </Step>
</Steps>

<Tip>
  The installer adds the OpenUPM registry to `Packages/manifest.json` and starts installing `so.daro.unity@1.0.0`.
</Tip>

## Configure Project

In Unity Editor, open **Daro > Integration Manager** and enter platform settings.

<Note>
  A dropdown at the top of the window switches the display language between English and Korean. English is the default, and the choice is stored in **Editor preferences rather than the project**, so it carries across every project on the same machine.
</Note>

<Steps>
  <Step title="Create Settings Asset">
    In Integration Manager, select **Create Settings Asset**. This creates `Assets/Daro/DaroSettings.asset`.
  </Step>

  <Step title="Enter iOS Settings">
    For iOS builds, enter the iOS key in `INTEGRATION KEY` under **Settings > iOS**. Put the App Tracking Transparency prompt text in `ATT Description`.

    Select `Validate Key` to check the key format. Also verify an app build and SDK initialization after completing setup.
  </Step>

  <Step title="Enter Android Settings">
    For Android builds, enter the Android key in `INTEGRATION KEY` under **Android**, then press `Validate Key` to check its shape.
  </Step>

  <Step title="Check Android Build Templates">
    When you switch the build target to Android, EDM4U asks **`Enable Android Auto-resolution?`**. Choose **Enable**.

    With auto-resolution on, EDM4U resolves the ad demand dependencies and **creates these three files itself, turning on the matching Player Settings options.** You do not need to enable them by hand.

    * `Assets/Plugins/Android/mainTemplate.gradle`
    * `Assets/Plugins/Android/gradleTemplate.properties`
    * `Assets/Plugins/Android/settingsTemplate.gradle`

    <Warning>
      **If you chose Disable, those three files are not created.** You then have to enable **Custom Main Gradle Template**, **Custom Gradle Properties Template**, and **Custom Gradle Settings Template** yourself under **Edit > Project Settings > Player > Android > Publishing Settings > Build**, and run **Assets > External Dependency Manager > Android Resolver > Resolve** by hand whenever dependencies change. Without resolution the app does not work.

      Auto-resolution can be turned back on from **Assets > External Dependency Manager > Android Resolver > Settings**.
    </Warning>

    During the Android build, DARO Unity SDK applies the required Gradle plugins, minimum SDK setting, and ProGuard rules to the exported project.
  </Step>

  <Step title="Validate Settings">
    Press `Run Checks` under **Build Validation** in Integration Manager.

    <Warning>
      **The checks only look at the active build target.** While the target is Standalone (Windows, Mac, Linux), the iOS and Android checks never run, so validation **passes even with both INTEGRATION KEYs empty.** Switch to Android or iOS under **File > Build Settings** before running it.
    </Warning>
  </Step>
</Steps>

<Warning>
  When building for Android with Unity `6000.3.17f1` or newer, add the following setting to `Assets/Plugins/Android/gradleTemplate.properties`.

  ```properties theme={null}
  android.uniquePackageNames=false
  ```

  This setting is required for compatibility with some dependencies.
</Warning>

<Tip>
  Turning on **AI Integration Helper** in Integration Manager lets AI coding agents — Claude Code, Codex, Cursor, Cline — pull the SDK's integration knowledge base automatically when a session starts. Enable it only if you hand the integration to an agent.
</Tip>

<Tip>
  The Integration Key is not passed to `InitializeAsync()`. Unity injects it into iOS `Info.plist` and Android `gradle.properties` at build time.
</Tip>

<Warning>
  **When updating from 0.4.0 or earlier**, replace the old integration settings in your Settings asset with Integration Keys. Enter the keys issued through the DARO dashboard in the iOS and Android `INTEGRATION KEY` fields.
</Warning>

## Check iOS build settings

Enable Podfile generation in EDM4U’s iOS Resolver. Complete CocoaPods installation in the generated project to apply the integration settings.

If you maintain an existing `post_install` block, check that it includes the DARO configuration and do not declare the block twice.

## Initialize SDK

Call `DaroSdk.InitializeAsync()` when your app starts.

```csharp theme={null}
using Daro;
using UnityEngine;

public sealed class GameBootstrap : MonoBehaviour
{
    private async void Start()
    {
        DaroSdk.HasGdprConsent = true;
        DaroSdk.SetUserId("user-12345");

        await DaroSdk.InitializeAsync();
        Debug.Log("Daro SDK ready");
    }
}
```

<Tip>
  You can set privacy options and user ID before SDK initialization.
</Tip>

## Mute and logging settings

With `0.5.0-rc.4`, you can configure mute before initialization on both Android and iOS. Call these APIs on the Unity main thread.

```csharp theme={null}
DaroSdk.LogLevel = DaroLogLevel.Info;
DaroSdk.SetAppMuted(true);
await DaroSdk.InitializeAsync();
// Load ads after initialization and the saved mute setting have been applied.
```

If you change mute several times before or during initialization, the last value is applied. The SDK applies mute before raising `OnSdkInitialized` and completing the initialization Task. After initialization, use `SetAppMuted(false)` to unmute.

On iOS, the default `Info` setting enables only error logs from the native SDK. Repeated `DaroRewardedAd.IsReady()` queries do not produce native debug logs. Use `DaroSdk.LogLevel = DaroLogLevel.Verbose` when detailed diagnostics are needed, then switch back to `Info`. Unity and bridge log levels are preserved; this setting does not suppress every log emitted directly by individual ad demand sources.

## Use Ad Instances

Use fullscreen ad instances in this order:

1. Complete `await DaroSdk.InitializeAsync()`.
2. Create the ad instance.
3. Register event handlers.
4. Call `Load()`.
5. After load completes, check `IsReady()` and call `Show()`.
6. Call `Dispose()` when the screen closes.

Banner ads are displayed automatically when `Load()` succeeds. Use `Show()` only to display a banner again after calling `Hide()`.

```csharp theme={null}
using Daro;
using UnityEngine;

public sealed class InterstitialAdHost : MonoBehaviour
{
    private const string AdUnitId = "your-ad-unit-id";
    private DaroInterstitialAd ad;

    private void OnEnable()
    {
        ad = new DaroInterstitialAd(AdUnitId);
        ad.OnAdLoaded += info => Debug.Log($"Loaded: {info.AdUnitId}");
        ad.OnAdFailedToLoad += error => Debug.LogWarning(error.Message);
        ad.Load();
    }

    public void Show()
    {
        if (ad != null && ad.IsReady())
        {
            ad.Show();
        }
    }

    private void OnDisable()
    {
        ad?.Dispose();
        ad = null;
    }
}
```

## Best Practices

### Working With Ad Instances

1. **Create ad instances after initialization completes**
   * Call the constructor and `Load()` only after `await DaroSdk.InitializeAsync()` returns
2. **Call public methods on Unity's main thread**
   * This covers constructors, `Load()`, `Show()`, `Hide()`, and `Dispose()`. SDK callbacks are delivered on Unity's main thread as well
3. **Dispose instances you no longer need**
   * The SDK provides finalizer-based cleanup as a fallback, but cleanup timing is not guaranteed
4. **Check `IsReady()` before `Show()`**
   * Banner ads are the exception: they display automatically once `Load()` succeeds. Use `Show()` only to display a banner again after `Hide()`

## Next Steps

With the integration and initialization done, move on to the format you plan to use.

* [Banner ads](/en/sdk-integration-v2/unity/ad-formats/banner)
* [Native ads](/en/sdk-integration-v2/unity/ad-formats/native)
* [Interstitial ads](/en/sdk-integration-v2/unity/ad-formats/interstitial)
* [Rewarded ads](/en/sdk-integration-v2/unity/ad-formats/rewarded)
* [App Open ads](/en/sdk-integration-v2/unity/ad-formats/appopen)
* [Light Popup ads](/en/sdk-integration-v2/unity/ad-formats/lightpopup)

To read revenue per impression, see [Use ILRD](/en/sdk-integration-v2/unity/ilrd).
