ShowRewardedInterstitial

Description

Display a rewarded interstitial ad if available.

Declaration

public static void ShowRewardedInterstitial(UnityAction<bool> completeMethod)

Parameters

NameDescription

completeMethod

Callback called when rewarded interstitial is closed. Use it to reward the user after ad view.

Example

public class Test : MonoBehaviour
{
    private void Start()
    {
        Gley.MobileAds.API.Initialize();
    }

    public void ShowRewardedInterstitial()
    {
        Gley.MobileAds.API.ShowRewardedInterstitial(VideoComplete);
    }

    private void VideoComplete(bool watched)
    {
        if (watched)
        {
            //reward the user
        }
        else
        {
            //video skipped - don't give the reward
        }
    }
}

Last updated