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.
라이트 팝업 광고 형태 소개
- 화면 위에 팝업 형태로 노출되는 광고입니다.
- 색상과 닫기 버튼 문구는
DaroLightPopupAdOptions로 설정할 수 있습니다.
광고 연동하기
광고 옵션 설정
var options = new DaroLightPopupAdOptions
{
CloseButtonText = "닫기"
};
광고 인스턴스 생성
private DaroLightPopupAd ad;
ad = new DaroLightPopupAd("your-lightpopup-ad-unit-id", options);
이벤트 핸들러 등록
ad.OnAdLoaded += info => Debug.Log("light popup loaded");
ad.OnAdFailedToLoad += error => Debug.LogWarning(error.Message);
ad.OnAdDismissed += info => Debug.Log("dismissed");
광고 로드 및 표시
ad.Load();
if (ad != null && ad.IsReady())
{
ad.Show();
}
광고 해제
ad?.Dispose();
ad = null;
Example
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;
}
}