From e0e78da9a3b578ca3d6af6fa5f42e281c0db03ff Mon Sep 17 00:00:00 2001 From: huyufei Date: Fri, 21 Jun 2024 17:05:03 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E3=80=90=E4=B8=AD=E5=8F=B0=E3=80=91?= =?UTF-8?q?=E3=80=90=E5=B9=BF=E5=91=8A=E3=80=91=E6=B7=BB=E5=8A=A0=20MAX=20?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E7=9A=84=E9=BB=91=E5=B1=8F=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --story=1020664 --user=yufei.hu 【中台】【广告】添加 MAX 平台的黑屏修复配置 https://www.tapd.cn/33527076/s/1152218 Signed-off-by: huyufei --- Runtime/GuruCore/Runtime/Ads/ADServiceBase.cs | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/Runtime/GuruCore/Runtime/Ads/ADServiceBase.cs b/Runtime/GuruCore/Runtime/Ads/ADServiceBase.cs index 5b94adc..cabf385 100644 --- a/Runtime/GuruCore/Runtime/Ads/ADServiceBase.cs +++ b/Runtime/GuruCore/Runtime/Ads/ADServiceBase.cs @@ -1,10 +1,9 @@ -using System; -using System.Collections.Generic; -using Guru; -using UnityEngine; - namespace Guru { + using System; + using UnityEngine; + using System.Collections.Generic; + public abstract class ADServiceBase : IADService where T : new() { // 单利定义 @@ -67,6 +66,16 @@ namespace Guru if(_model == null) _model = AdsModel.Create(); this.Log("AD SDK Start Init"); + InitMaxAds(); // 初始化 MAX 广告 + + InitService(); // 内部继承接口 + } + + /// + /// 初始化 MAX 广告组件 + /// + private void InitMaxAds() + { //-------------- 初始化回调 ------------------ MaxSdkCallbacks.OnSdkInitializedEvent += OnMaxSdkInitializedCallBack; MaxSdkCallbacks.Interstitial.OnAdRevenuePaidEvent += OnAdRevenuePaidEvent; @@ -96,8 +105,7 @@ namespace Guru //-------------- SDK 初始化 ------------------- if (_initSpec == null) _initSpec = AdsInitSpec.BuildDefault(); MaxSdk.SetVerboseLogging(_initSpec.isDebug); - - InitService(); // 内部继承接口 + MaxSdk.SetExtraParameter("enable_black_screen_fixes", "true"); // 修复黑屏 } protected virtual void InitService()