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.
- Ads shown as a popup over the current screen.
- Configure colors and close button text with
DaroLightPopupAdOptions.
Integrating Ads
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;
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;
}
}