🗂️
ONE AdMax Developer Guides
EN
EN
  • 00. about ONE AdMax
  • 01. How to Issue a Media Key
  • 02. How to Issue a Placement Key
  • 03. SDK for Java
    • 3-1. Rewarded Video Ads
    • 3-2. Interstitial Ads
    • 3-3. Banner Ads
    • 3-4. Interstitial Video Ads (Non Reward)
  • 04. Unity-Plugin Guide
    • 4-1. Rewarded Video Ads for Unity
    • 4-2. Interstitial Ads for Unity
    • 4-3. Banner Ads for Unity
    • 4-4. Interstitial Video Ads for Unity (Non Reward)
  • 05. Flutter-Plugin Guide
    • 5-1. 보상형 비디오 광고 for Flutter
    • 5-2. 전면 광고 for Flutter
    • 5-3. 배너 광고 구현하기
    • 5-4. 전면 비디오 광고 for Flutter (비보상형)
  • 📌Starting Mediation
  • ONE AdMax SDK Error Codes
  • SDK Version 안내 사항
    • SDK 1.2.0
    • SDK 1.0.2
Powered by GitBook
On this page
  • Development environment
  • Requirements
  • Importing ONE AdMax for Unity Plugin
  • Include external dependencies
  • Issuing and applying the media key
  • SDK required permissions
  • SDK Initialize
  • Log Settings
  • GDPR Settings
  • COPPA Settings
  • Application Quit
  • Mediation settings
  • Choose ad format
  • Rewarded Video ADs
  • Interstitial ADs
  • Banner ADs
  • Interstitial Video ADs (Non Reward)

04. Unity-Plugin Guide

Previous3-4. Interstitial Video Ads (Non Reward)Next4-1. Rewarded Video Ads for Unity

Last updated 16 days ago

Development environment

Requirements

  • Unity 2022.3.11f1 or higher

  • Android SDK version

    • Minimum API Level 16 or higher

    • Target API Level 33 or higher

The Android API level can be configured in Project Settings > Player > Other Settings.

Importing ONE AdMax for Unity Plugin

In the Unity menu bar, click Assets > Import Package > Custom Package.

The Assets/OneStoreCorpPlugins/com.oneadmax.global folder will be created.

Include external dependencies

To include repositories and dependencies in your project, follow these steps: Project Settings > Player > Publishing Settings > Build

  • Custom Main Manifest

  • Custom Main Gradle Template

  • Custom Gradle Settings Template

Go to Assets > External Dependency Manager > Android Resolver > Force Resolve and select it.

The Maven Repository URL will be applied to the settingsTemplate.gradle file.

The Maven Module will be applied to the mainTemplate.gradle file.

The dependencies for the ONEAdMax for Unity plugin are listed in the following file: Assets/OneStoreCorpPlugins/com.oneadmax.global/Editor/ONEAdMaxDependencies.xml


Issuing and applying the media key

If you have received the media key, you need to configure the <meta-data /> in the AndroidManifest.xml file.

<manifest>
    ...
    <application>
        ...
        <activity android:name="com.unity3d.player.UnityPlayerActivity">
            ...
        </activity>

        <meta-data android:name="com.oneadmax.global.appkey" android:value="your app key"/>
    </application>
</manifest>
  • Please confirm that the media key is added to the AndroidManifest.xml.

  • Since the media key is read by the Java SDK, regardless of the Unity plugin, the <meta-data /> should be located inside the <application> element.

SDK required permissions

<manifest>
    ...
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    ...
</manifest>

SDK Initialize

Before loading ads, the app must initialize ONEAdMax. The initialization with ONEAdMaxClient.Initialize() should be done 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
            });
        }
    }
}

Log Settings

For development, you can enable detailed logs for ONEAdMax. (default: false)

ONEAdMaxClient.SetLogEnable(true);

GDPR Settings

To comply with the EU's GDPR (General Data Protection Regulation), the following API is added. Please call the API only for users who require GDPR consent. (default: true)

ONEAdMaxClient.GdprConsentAvailable(true);

COPPA Settings

To comply with the COPPA (Children's Online Privacy Protection Act), the following API is added. On such devices, all ad requests will result in "No ad" being served. (default: false)

ONEAdMaxClient.tagForChildDirectedTreatment(false);

Application Quit

When the application is closed, it releases the resources allocated in memory (such as views and memory).

void OnApplicationQuit()
{
    ONEAdMaxClient.Destroy();
}

Mediation settings

For stable Fill Rates and eCPM, it is recommended to set up a waterfall mediation.


Choose ad format

Rewarded Video ADs

This is a reward-based video ad. When the video ad finishes, the completion information is sent via the Complete event callback.

Interstitial ADs

This is an ad that covers the entire screen of the app. Once completed or interrupted by the user, the app's screen will be displayed.

Banner ADs

This displays a rectangular ad that occupies part of the app's screen. You can set the position and time to automatically refresh the ad.

Interstitial Video ADs (Non Reward)

This is an ad type similar to video ads, but without offering rewards.

is distributed as a required component. If you are already using it, uncheck ExternalDependencyManager during the Import Package step before proceeding.

EDM4U(External Dependency Manager for Unity)
01. How to Issue a Media Key
📌Starting Mediation
4-1. Rewarded Video Ads for Unity
4-2. Interstitial Ads for Unity
4-3. Banner Ads for Unity
4-4. Interstitial Video Ads for Unity (Non Reward)

Unity

2022.3.11f1

Java SDK (Java 11)

ONE AdMax SDK v1.2.1

Releases · ONE-AdMax/ONEAdMax-UnityGitHub
Logo