4-4. Interstitial Video Ads for Unity (Non Reward)
It is the same format as video ads, but it is a type of ad that does not provide rewards.
Before you begin
04. Unity-Plugin GuideONEAdMax SDK initialize
Initialization of ONEAdMax is required before loading ads.
ONEAdMaxClient.Initialize() should only be executed once during the initial setup.
...
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
});
}
}
}Interstitial Video Ads sample code
You can create an instance of OAMInterstitialVideo and handle events to extend its functionality.
Create an instance of the OAMInterstitialVideo ad.
Set the network schedule timeout (optional)
๊ด๊ณ ์ ๋ํ ๋คํธ์ํฌ ์ค์ผ์ฅด ํ์์์์ ์ค์ ํฉ๋๋ค. (๊ธฐ๋ณธ๊ฐ: 5์ด) ๊ด๊ณ ๋ก๋ฉ ์ ๊ฐ ๋คํธ์ํฌ ๋ณ๋ก ํ์์์ ์๊ฐ์ ์ฃผ์ด ํด๋น ์๊ฐ ์์ ๊ด๊ณ ๋ฅผ ๋ฐ์ง ๋ชปํ ๊ฒฝ์ฐ, ๋ค์ ๋คํธ์ํฌ๋ก ๋์ด๊ฐ๋๋ค.
Set the event listener for Interstitial Video Ads (optional)
ONE AdMax SDK Error CodesCreate an instance of the Interstitial Video Ad
Complete all the settings and create the OAMInterstitialVideo.
Load the Interstitial Video Ad.
์ ๋ฉด ๋น๋์ค ๊ด๊ณ Load() API๋ฅผ ํธ์ถํ์ฌ ์๋ฒ์ ๊ด๊ณ ๋ฅผ ์์ฒญํฉ๋๋ค.
Excessive ad requests can lead to blocking, so please be cautious!
Display the Interstitial Video Ad.
๋ก๋๊ฐ ์๋ฃ๋๋ฉด ๊ด๊ณ ๋ฅผ ๋
ธ์ถ์ ์ํ๋ ์์ ์ Show() API๋ฅผ ํธ์ถํ์ฌ ํ๋ฉด์ ๋
ธ์ถ ์ํต๋๋ค.
Destroy the memory for the Interstitial Video Ad.
Check whether the Interstitial Video Ad is loaded
Check whether the Interstitial Video Ad is loaded. (returns true | false)
Last updated