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 GuideONEAdMax 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.
Each user should have a unique user identifier that is not a variable value.
It should not include personal information (such as email, name, phone number, or identifiable user IDs).
If the identifier contains Korean, special characters, or spaces, it must be URL encoded before use.
The user identifier should be set before the user enters the ad.
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 CodesCreate 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.
Excessive ad requests can result in a block, so please be careful!
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.
If not handled, it may result in missing report data when using third-party mediation.
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 MediationLast updated