4-1. Rewarded Video Ads for Unity

This is an ad type where users are rewarded after watching the video ad to completion.

Before you begin

04. Unity-Plugin Guide

ONEAdMax SDK initialization

ONEAdMax initialization is required before loading ads. The ONEAdMaxClient.Initialize() should be performed only once.

...
using ONEAdMax;
...
public class ONEAdMaxDemo : MonoBehaviour
{
    private static bool _isInitialized = false;
    
    void Start()
    {
        if (!_isInitialized)
        {
            // Initialize the ONEAdMax SDK.
            ONEAdMaxClient.Initialize(() =>
            {
                // This callback is called once the ONEAdMax SDK is initialized.
                _isInitialized = true
            });
        }
    }
}

User identifier setting

It is used to identify users for reward distribution when they complete watching a reward video.


Reward Video AD Sample Code

You can create an OAMRewardVideo instance and handle events to extend its functionality.

Create a Reward Video Ad instance

Network schedule timeout setting (optional)

Set the network schedule timeout for Reward Video Ads. When loading the Reward Video Ad, you can set a timeout for each network. If the ad is not received within the specified time, it will move on to the next network.

Setting up event listeners for Reward Video Ads (optional)

ONE AdMax SDK Error Codes

Create a Reward Video Ad

Once all settings are complete, create the OAMInterstitialVideo.

Load the Reward Video Ad

Call the Load() API for the Reward Video Ad to request an ad from the server.

Display the Reward Video Ad

Once the ad has finished loading, call the Show() API at the desired point to display the ad on the screen.

Destroys the ad

Check if the Reward Video Ad has been loaded

Check the load status of the Reward Video Ad. (returns true | false)

Extending the application's lifecycle

You need to implement checking the onPause / onResume status of the application where the ad is being displayed.

Call the CS page

This is the API to display the ad CS page.


Mediation settings

For stable fill rates and eCPM, it is recommended to set up mediation with AppLovin, Unity Ads, and Vungle.

📌Starting Mediation

Last updated