From 01008ca8c7945c1223602534f4a0c3eb054863fb Mon Sep 17 00:00:00 2001 From: huyufei Date: Mon, 18 Mar 2024 15:38:11 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E5=BB=B6=E8=BF=9F=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E5=B9=BF=E5=91=8A=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/Code/SDK/GuruSDK.Ads.cs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Runtime/Code/SDK/GuruSDK.Ads.cs b/Runtime/Code/SDK/GuruSDK.Ads.cs index a2fc020..675cb2b 100644 --- a/Runtime/Code/SDK/GuruSDK.Ads.cs +++ b/Runtime/Code/SDK/GuruSDK.Ads.cs @@ -1,5 +1,7 @@ +using System.Threading.Tasks; + namespace Guru { using UnityEngine; @@ -111,9 +113,10 @@ namespace Guru /// private void OnGuruConsentOver(int code) { - + + // StartAdService(_adInitSpec); // 无论状态如何, 都在回调内启动广告初始化 - StartAdService(_adInitSpec); + OnDelayStartAdService(); // 延迟启动广告服务 // 调用回调 Callbacks.ConsentFlow._onConsentResult?.Invoke(code); @@ -132,7 +135,15 @@ namespace Guru break; } } - + + + private async void OnDelayStartAdService() + { + await Task.Delay(2000); + StartAdService(_adInitSpec); + } + + #endregion #region IOS ATT 广告授权流程