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

# Light Popup Ads

> Implement light popup ads in your Unity project.

## Light Popup Ad Format

* Ads shown as a popup over the current screen.
* Configure colors and close button text with `DaroLightPopupAdOptions`.

### Android Light Popup Example

<img src="https://mintcdn.com/delightroom-5a71a6a8/LXIzQfIe2eSe0uQc/sdk-integration/common-img/ad-formats-en/android-light-popup-default.png?fit=max&auto=format&n=LXIzQfIe2eSe0uQc&q=85&s=07b02d85b02c89d05002ec324f104982" alt="Android default light popup UI" style={{ width: "38%" }} width="778" height="1688" data-path="sdk-integration/common-img/ad-formats-en/android-light-popup-default.png" />

### iOS Light Popup Example

<img src="https://mintcdn.com/delightroom-5a71a6a8/LXIzQfIe2eSe0uQc/sdk-integration/common-img/ad-formats-en/ios-light-popup-default.png?fit=max&auto=format&n=LXIzQfIe2eSe0uQc&q=85&s=b1de45e868197a0f1dea8495a6eb0ed8" alt="iOS default light popup UI" style={{ width: "38%" }} width="782" height="1696" data-path="sdk-integration/common-img/ad-formats-en/ios-light-popup-default.png" />

***

<Warning>
  Use an Ad Unit Key configured for the light popup format. Substituting a native Ad Unit Key causes loading to fail with `Ad unit type mismatch: requested=light_popup, server=native`.
</Warning>

<Note>
  In iOS landscape orientation, media or the CTA may be clipped. This limitation remains in `0.5.0-rc.4`; use portrait orientation on iOS.
</Note>

## Integrating Ads

<Steps>
  <Step title="Configure Ad Options">
    ```csharp theme={null}
    var options = new DaroLightPopupAdOptions
    {
        CloseButtonText = "Close"
    };
    ```
  </Step>

  <Step title="Create Ad Instance">
    ```csharp theme={null}
    private DaroLightPopupAd ad;

    ad = new DaroLightPopupAd("your-lightpopup-ad-unit-id", options);
    ```
  </Step>

  <Step title="Register Event Handlers">
    ```csharp theme={null}
    ad.OnAdLoaded += info => Debug.Log("light popup loaded");
    ad.OnAdFailedToLoad += error => Debug.LogWarning(error.Message);
    ad.OnAdDismissed += info => Debug.Log("dismissed");
    ```
  </Step>

  <Step title="Load and Show Ad">
    ```csharp theme={null}
    ad.Load();

    if (ad != null && ad.IsReady())
    {
        ad.Show();
    }
    ```
  </Step>

  <Step title="Dispose Ad">
    ```csharp theme={null}
    ad?.Dispose();
    ad = null;
    ```
  </Step>
</Steps>

***

## Example

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

public sealed class LightPopupHost : MonoBehaviour
{
    [SerializeField] private string adUnitId = "your-lightpopup-ad-unit-id";
    private DaroLightPopupAd ad;

    private void OnEnable()
    {
        var options = new DaroLightPopupAdOptions
        {
            CloseButtonText = "Close"
        };

        ad = new DaroLightPopupAd(adUnitId, options);
        ad.OnAdLoaded += info => Debug.Log("light popup loaded");
        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;
    }
}
```
