Skip to main content

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 Ad Format

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

Integrating Ads

1

Configure Ad Options

var options = new DaroLightPopupAdOptions
{
    CloseButtonText = "Close"
};
2

Create Ad Instance

private DaroLightPopupAd ad;

ad = new DaroLightPopupAd("your-lightpopup-ad-unit-id", options);
3

Register Event Handlers

ad.OnAdLoaded += info => Debug.Log("light popup loaded");
ad.OnAdFailedToLoad += error => Debug.LogWarning(error.Message);
ad.OnAdDismissed += info => Debug.Log("dismissed");
4

Load and Show Ad

ad.Load();

if (ad != null && ad.IsReady())
{
    ad.Show();
}
5

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;
    }
}