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 Guide

ONEAdMax 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 Codes

Create an instance of the Interstitial Video Ad

Complete all the settings and create the OAMInterstitialVideo.

Load the Interstitial Video Ad.

์ „๋ฉด ๋น„๋””์˜ค ๊ด‘๊ณ  Load() API๋ฅผ ํ˜ธ์ถœํ•˜์—ฌ ์„œ๋ฒ„์— ๊ด‘๊ณ ๋ฅผ ์š”์ฒญํ•ฉ๋‹ˆ๋‹ค.

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