Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Implement light popup ads in your Unity project.
DaroLightPopupAdOptions
Configure Ad Options
var options = new DaroLightPopupAdOptions { CloseButtonText = "Close" };
Create Ad Instance
private DaroLightPopupAd ad; ad = new DaroLightPopupAd("your-lightpopup-ad-unit-id", options);
Register Event Handlers
ad.OnAdLoaded += info => Debug.Log("light popup loaded"); ad.OnAdFailedToLoad += error => Debug.LogWarning(error.Message); ad.OnAdDismissed += info => Debug.Log("dismissed");
Load and Show Ad
ad.Load(); if (ad != null && ad.IsReady()) { ad.Show(); }
Dispose Ad
ad?.Dispose(); ad = 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; } }