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()