You've already forked Commercialization.tapadn
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2293d2803a | |||
| b6370d5bf8 |
@@ -1,3 +1,15 @@
|
||||
# [1.0.8]
|
||||
|
||||
### 修复
|
||||
|
||||
* 修复 Editor 广告位诊断在编译期触发 `CS0165` 未赋值变量错误的问题。
|
||||
|
||||
# [1.0.7]
|
||||
|
||||
### 修复
|
||||
|
||||
* 接入 `CC-Framework.Commercialization` 的 Editor 诊断接口,Unity Editor 模拟点击广告时也会输出 TapADN 当前解析出的广告位 ID。
|
||||
|
||||
# [1.0.6]
|
||||
|
||||
### 修复
|
||||
|
||||
@@ -3,7 +3,7 @@ using Dirichlet.Mediation;
|
||||
using Runtime.ADAggregator;
|
||||
using UnityEngine;
|
||||
|
||||
public sealed class TapadnAdController : IAdController
|
||||
public sealed class TapadnAdController : IAdController, IAdEditorDiagnostics
|
||||
{
|
||||
public static TapadnControllerOptions CurrentOptions { get; private set; }
|
||||
public static string LastSdkVersion { get; private set; }
|
||||
@@ -73,4 +73,41 @@ public sealed class TapadnAdController : IAdController
|
||||
{
|
||||
_maskAction?.Invoke(isOpen);
|
||||
}
|
||||
|
||||
public void LogEditorAdPlacement(ADConfig adConfig, AD_Type adType, string adScene, string action, object[] args)
|
||||
{
|
||||
var options = TapadnControllerOptions.Resolve(adConfig, args);
|
||||
var normalizedScene = string.IsNullOrWhiteSpace(adScene) ? "__default__" : adScene.Trim();
|
||||
var slotSource = "default";
|
||||
var slotId = ResolveEditorSlotId(adConfig, options, adType, normalizedScene, out slotSource);
|
||||
Debug.Log($"[TapADN] Editor ad {action}. type={adType}, scene={normalizedScene}, slot={DisplayEditorValue(slotId)}, source={slotSource}");
|
||||
}
|
||||
|
||||
private static string ResolveEditorSlotId(ADConfig adConfig, TapadnControllerOptions options, AD_Type adType, string adScene, out string slotSource)
|
||||
{
|
||||
slotSource = "default";
|
||||
switch (adType)
|
||||
{
|
||||
case AD_Type.AwardVideo:
|
||||
var defaultRewardedSlotId = adConfig?.BaseAwardAdKeyValue?.value;
|
||||
var mapped = false;
|
||||
var rewardedSlotId = options == null
|
||||
? defaultRewardedSlotId
|
||||
: options.ResolveRewardedSlotId(defaultRewardedSlotId, adScene, out mapped);
|
||||
slotSource = mapped ? "scene" : "default";
|
||||
return rewardedSlotId;
|
||||
case AD_Type.Interaction:
|
||||
return adConfig?.BaseInteractionAdKeyValue?.value;
|
||||
case AD_Type.Splash:
|
||||
return adConfig?.BaseSplashAdKeyValue?.value;
|
||||
default:
|
||||
slotSource = "unsupported";
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static string DisplayEditorValue(string value)
|
||||
{
|
||||
return string.IsNullOrWhiteSpace(value) ? "<empty>" : value.Trim();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "com.commercialization.tapadn",
|
||||
"displayName": "Commercialization.tapadn",
|
||||
"description": "TapADN / Dirichlet mediation implementation for CC-Framework.Commercialization.",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.8",
|
||||
"unity": "2022.3",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -15,7 +15,7 @@
|
||||
"url": "https://gitee.com/foldcc"
|
||||
},
|
||||
"dependencies": {
|
||||
"com.foldcc.cc-framework.commercialization": "http://private.lightyears.ltd:18650/foldcc/CC-Framework.Commercialization.git#1.0.15"
|
||||
"com.foldcc.cc-framework.commercialization": "http://private.lightyears.ltd:18650/foldcc/CC-Framework.Commercialization.git#1.0.16"
|
||||
},
|
||||
"samples": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user