You've already forked Commercialization.tapadn
35 lines
1.2 KiB
C#
35 lines
1.2 KiB
C#
|
|
using System;
|
||
|
|
using Runtime.ADAggregator;
|
||
|
|
|
||
|
|
public static class TapadnCommercialization
|
||
|
|
{
|
||
|
|
public static TapadnAdController CreateController()
|
||
|
|
{
|
||
|
|
return new TapadnAdController();
|
||
|
|
}
|
||
|
|
|
||
|
|
public static void InitADManager(Action onCallback, string userId, ADConfig adConfig, params object[] args)
|
||
|
|
{
|
||
|
|
ADManager.Instance.Init(onCallback, userId, adConfig, CreateController(), args);
|
||
|
|
}
|
||
|
|
|
||
|
|
public static ADConfig CreateConfig(
|
||
|
|
string mediaId,
|
||
|
|
string mediaKey,
|
||
|
|
string mediaName,
|
||
|
|
string rewardSlotId,
|
||
|
|
string interstitialSlotId = null,
|
||
|
|
string splashSlotId = null)
|
||
|
|
{
|
||
|
|
var config = UnityEngine.ScriptableObject.CreateInstance<ADConfig>();
|
||
|
|
config.ConfigName = "TapADN";
|
||
|
|
config.Id = mediaId;
|
||
|
|
config.Key = mediaKey;
|
||
|
|
config.Key2 = mediaName;
|
||
|
|
config.BaseAwardAdKeyValue = new AdKeyValue { key = "reward", value = rewardSlotId };
|
||
|
|
config.BaseInteractionAdKeyValue = new AdKeyValue { key = "interaction", value = interstitialSlotId };
|
||
|
|
config.BaseSplashAdKeyValue = new AdKeyValue { key = "splash", value = splashSlotId };
|
||
|
|
return config;
|
||
|
|
}
|
||
|
|
}
|