You've already forked Commercialization.tapadn
release: 1.0.4
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Runtime.ADAggregator;
|
||||
|
||||
public static class TapadnCommercialization
|
||||
@@ -31,4 +32,31 @@ public static class TapadnCommercialization
|
||||
config.BaseSplashAdKeyValue = new AdKeyValue { key = "splash", value = splashSlotId };
|
||||
return config;
|
||||
}
|
||||
|
||||
public static void SetRewardedSceneSlots(ADConfig config, IDictionary<string, string> sceneSlotIds)
|
||||
{
|
||||
if (config == null || sceneSlotIds == null || sceneSlotIds.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (config.CommonKeyValues == null)
|
||||
{
|
||||
config.CommonKeyValues = new List<AdKeyValue>();
|
||||
}
|
||||
|
||||
foreach (var entry in sceneSlotIds)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(entry.Key) || string.IsNullOrWhiteSpace(entry.Value))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
config.CommonKeyValues.Add(new AdKeyValue
|
||||
{
|
||||
key = TapadnControllerOptions.RewardedSceneSlotPrefix + entry.Key.Trim(),
|
||||
value = entry.Value.Trim()
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user