ShowBuiltInConsentPopup

Description

Show a built-in consent popup.

If the selected advertiser has one, it will be shown, otherwise, the default popup available in the Mobile Ads package will be shown.

Declaration

 public static void ShowBuiltInConsentPopup(UnityAction consentPopupClosed)

Parameters

NameDescription

consentPopupClosed

Callback called when consent popup is closed

Example

public class Test : MonoBehaviour
{
    private void Start()
    {
        Gley.MobileAds.API.Initialize();
    }
    
    public void SHowConsentPopup()
    {
        //Pause game
        Gley.MobileAds.API.ShowBuiltInConsentPopup(PopupClosed);
    }

    private void PopupClosed()
    {
        //Resume game
    }
}

Last updated