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

# 라이트 팝업 광고

> Unity 프로젝트에서 DARO 라이트 팝업 광고를 구현하는 방법을 알아봅니다.

## 라이트 팝업 광고 형태 소개

* 화면 위에 팝업 형태로 노출되는 광고입니다.
* 색상과 닫기 버튼 문구는 `DaroLightPopupAdOptions`로 설정할 수 있습니다.

***

## 광고 연동하기

<Steps>
  <Step title="광고 옵션 설정">
    ```csharp theme={null}
    var options = new DaroLightPopupAdOptions
    {
        CloseButtonText = "닫기"
    };
    ```
  </Step>

  <Step title="광고 인스턴스 생성">
    ```csharp theme={null}
    private DaroLightPopupAd ad;

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

  <Step title="이벤트 핸들러 등록">
    ```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="광고 로드 및 표시">
    ```csharp theme={null}
    ad.Load();

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

  <Step title="광고 해제">
    ```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;
    }
}
```
